HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

rexec — Execute a command on a remote host. Note: Use `rexec` with caution, as it transmits data in plain te

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandnoteexecuteclihostrexecremote
linux

Problem

How to use the rexec command: 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/inetutils.html#rexec-invocation>.

Solution

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/inetutils.html#rexec-invocation>.

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}}

Code Snippets

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}}

Context

tldr-pages: linux/rexec

Revisions (0)

No revisions yet.