REXEC(1)
π REXEC(1) π
okay so bestie, welcome to the General Commands Manual page for rexec β yes that's the manual name, it lives in section 1, we're doing this π
β¨ NAME β¨
rexec β remote execution client for an exec server π₯οΈβ¨
πΈ SYNOPSIS πΈ
rexec [ -abcdhns -l username -p password ] host command
π¦ DESCRIPTION π¦
so like. Rexec calls the rexec(3) routine to act as a client for the remote host's rexecd(8) server. that's the whole vibe fr fr π«Ά
It asks that command be run on the host computer, using username/password authentication. See rexec(3) and rexecd(8) for details of the protocol. π
π OPTIONS π
Rexec accepts several options, but only three are likely to be very useful:
-lusername β Set the log-in name on the remote host to username.-ppassword β Provide the password for the remote account. The command line argument will be blanked after being parsed, to prevent it from being seen withps(1). However, it is still not very secure to type the password on the command line. In particular, be sure that the shell's history file is protected. π-nβ Explicitly prompt for name and password, even if provided in the environment, in the$HOME/.netrcfile, or in the environmental variablesREXEC_USERandREXEC_PASS.
Other options that might be useful with non-standard remote exec daemons, or to debug connections:
-aβ Do not set up an auxiliary channel for standard error fromcommand; the remote standard error and output are then both returned on the local standard output. By default,rexecasks that a separate channel be set up for diagnostic output from the remote command.-bβ Use signal handling as in BSDrsh(1). Only the signalsSIGINT,SIGQUIT, andSIGTERMare echoed to the remote process. They do not remain raised locally, sorexecwaits for the remote command to shutdown its side of the socket. Also,CNTRL-Zwill only suspend execution locally--the remote command may continue to run.-cβ Do not close remote standard input when local standard input closes. Normally the standard input to the remote command is closed when the local standard input is closed.-dβ Turn on debugging information. In particular the command sent to the remote host will be echoed. π₯-hβ Print a usage message.-sβ Do not echo signals received by therexeconto the remote process. Normally, signals which can be trapped are passed on to the remote process; then, when you typeCNTRL-C, the remote process terminates as well.
π USERNAME AND PASSWORD π
Rexec(1) searches for the username and password in the following order:
- If
-nis given on the command line, the user will always be prompted for both, even if they are also given on the command line. - The command line will be parsed
- If the environmental variables
REXEC_USERorREXEC_PASSare defined, they will define the username or password. - The
$HOME/.netrcfile will be searched. Seeftp(1)for a description of this file's format. - Finally, the user will be prompted if either the username or password remains undefined.
π SECURITY π
Users of this command should be aware that rexec(3) transmits their password to the remote host clear text, not encrypted. If the network is not secure to the remote host, the password can be comprimised.
ok so that's a huge deal bestie, no cap, it's literally clear text out here π protect yourself.
β SIGNALS β
Without the -b option, all signals which can be handled are echoed to the remote process. Afterwards, however, they remain raised in the local process. Typically, this means that rexec(1) will exit after receiving a fatal signal, even if the remote process has arranged to handle or ignore it.
Differing operating systems use differing signal numbers; for example AIX and SunOS use 18 for SIGTSTP (^Z), while Linux uses 20. Therefore, it may have a different effect remotely than locally. In particular, typing CNTL-Z may not suspend the execution of the remote process. π
π EXAMPLE π
rexec othermachine cat ">remote_file; date" <local_file
will send local_file to the othermachine as remote_file. ate. π
π§ BUGS π§
Please send bug reports, system incompatibilities, and job offers to the author. π (yes, job offers, iconic)
π«Ά SEE ALSO π«Ά
π AUTHOR π
Michael Sadd mas22@cornell.edu http://www.tc.cornell.edu/~sadd/
Thanks to Orange Gopher (2/10/97) and Johannes Plass (plass@dipmza.physik.uni-mainz.de, Oct. 17 1996) for useful suggestions. π
and that's the whole page bestie!! this one came out of the General Commands Manual with a date of February 14, 1997 β a valentine's day release, we love that for it ππ go forth and remote-execute responsibly (or, y'know, don't, because of the clear-text password thing, but that's your call π«Ά)
π¦ where this page comes from
- epel 10: rsh 0.17-113.el10_2 Β· BSD-4-Clause-UC
- epel 9: rsh 0.17-102.el9 Β· BSD
- fedora 43: rsh 0.17-112.fc43 Β· BSD-4-Clause-UC
- fedora 44: rsh 0.17-113.fc44 Β· BSD-4-Clause-UC
- Copyright (c) 1996 Michael Sadd (sadd@cornell.edu)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms