1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/linux/rexec.md

22 lines
753 B
Markdown
Raw Normal View History

# rexec
> Execute a command on a remote host.
> Note: Use `rexec` with caution, as it transmits data in plain text. Consider secure alternatives like SSH for encrypted communication.
> More information: <https://www.gnu.org/software/inetutils/manual/html_node/rexec-invocation.html>.
- Execute a command on a remote host:
`rexec {{[-h|--host]}} {{remote_host}} {{ls -l}}`
- Specify the remote username on a remote host:
`rexec {{[-u|--username]}} {{username}} {{[-h|--host]}} {{remote_host}} {{ps aux}}`
- Redirect `stdin` from `/dev/null` on a remote host:
`rexec {{[-n|--noerr]}} {{[-h|--host]}} {{remote_host}} {{ls -l}}`
- Specify the remote port on a remote host:
`rexec {{[-P|--port]}} {{1234}} {{[-h|--host]}} {{remote_host}} {{ls -l}}`