2023-11-11 15:57:05 +00:00
|
|
|
# rexec
|
|
|
|
|
|
|
|
> Execute a command on a remote host.
|
2024-03-14 05:01:06 +00:00
|
|
|
> Note: Use `rexec` with caution, as it transmits data in plain text. Consider secure alternatives like SSH for encrypted communication.
|
2023-11-11 15:57:05 +00:00
|
|
|
> More information: <https://www.gnu.org/software/inetutils/manual/html_node/rexec-invocation.html>.
|
|
|
|
|
|
|
|
- Execute a command on a remote [h]ost:
|
|
|
|
|
|
|
|
`rexec -h={{remote_host}} {{ls -l}}`
|
|
|
|
|
|
|
|
- Specify the remote [u]sername on a remote [h]ost:
|
|
|
|
|
|
|
|
`rexec -username={{username}} -h={{remote_host}} {{ps aux}}`
|
|
|
|
|
|
|
|
- Redirect `stdin` from `/dev/null` on a remote [h]ost:
|
|
|
|
|
|
|
|
`rexec --no-err -h={{remote_host}} {{ls -l}}`
|
|
|
|
|
|
|
|
- Specify the remote [P]ort on a remote [h]ost:
|
|
|
|
|
|
|
|
`rexec -P={{1234}} -h={{remote_host}} {{ls -l}}`
|