rshd
rshd: the remote shell’s daemon.
Synopsis
rshd
Description
rshd takes rsh(1)’s connections on TCP port 514, and answers rsh’s search for hosts on UDP port 514 with its host’s name (hostname(1)). It’s a service: rc rshd start runs it, and rc rshd enable starts it at boot; it’s off until then.
Each connection gets a session of its own (rshd runs itself with -s, the connection as its input, as inetd ran BSD’s rshd). A login runs sh on a pty as big as rsh’s terminal: what rsh sends is typed into it, so the pty does the terminal’s work (echo, line editing, ^C), and what it shows goes back. A command runs with sh -c, on pipes: its input from rsh, its output and errors back apart, then how it ended. When rsh goes, a login’s line hangs up (SIGHUP to its shell), and a command’s input ends.
Files
- /etc/rc.d/rshd
- Its service.
Notes
No passwords and no encryption: anyone whose network card reaches this computer’s gets a shell on it, as with Berkeley’s rshd before .rhosts files. Leave it off where that matters.
See also
rsh(1), rcp(1), rc(1)