2023-11-11 16:57:05 +01:00
|
|
|
# rexec
|
|
|
|
|
|
|
|
> Execute a command on a remote host.
|
2024-03-14 02:01:06 -03:00
|
|
|
> Note: Use `rexec` with caution, as it transmits data in plain text. Consider secure alternatives like SSH for encrypted communication.
|
2025-08-16 10:31:07 +03:00
|
|
|
> More information: <https://www.gnu.org/software/inetutils/manual/inetutils.html#rexec-invocation>.
|
2023-11-11 16:57:05 +01:00
|
|
|
|
2025-03-26 02:30:50 +02:00
|
|
|
- Execute a command on a remote host:
|
2023-11-11 16:57:05 +01:00
|
|
|
|
2025-03-26 02:30:50 +02:00
|
|
|
`rexec {{[-h|--host]}} {{remote_host}} {{ls -l}}`
|
2023-11-11 16:57:05 +01:00
|
|
|
|
2025-03-26 02:30:50 +02:00
|
|
|
- Specify the remote username on a remote host:
|
2023-11-11 16:57:05 +01:00
|
|
|
|
2025-03-26 02:30:50 +02:00
|
|
|
`rexec {{[-u|--username]}} {{username}} {{[-h|--host]}} {{remote_host}} {{ps aux}}`
|
2023-11-11 16:57:05 +01:00
|
|
|
|
2025-03-26 02:30:50 +02:00
|
|
|
- Redirect `stdin` from `/dev/null` on a remote host:
|
2023-11-11 16:57:05 +01:00
|
|
|
|
2025-03-26 02:30:50 +02:00
|
|
|
`rexec {{[-n|--noerr]}} {{[-h|--host]}} {{remote_host}} {{ls -l}}`
|
2023-11-11 16:57:05 +01:00
|
|
|
|
2025-03-26 02:30:50 +02:00
|
|
|
- Specify the remote port on a remote host:
|
2023-11-11 16:57:05 +01:00
|
|
|
|
2025-03-26 02:30:50 +02:00
|
|
|
`rexec {{[-P|--port]}} {{1234}} {{[-h|--host]}} {{remote_host}} {{ls -l}}`
|