RLOGIND(8)
π» rlogind(8) β the remote login server, bestie edition β¨
okay so picture this: it's the system manager's manual, section 8, and the star of the show is rlogind. yes we're getting into it. π
β¨ NAME β¨
rlogind β the remote login server. she's the one answering the door for rlogin. π«Ά
π¦ SYNOPSIS π¦
rlogind [-ahlLn]
that's it. that's the whole vibe check. five little flags, so much power. π
πΈ DESCRIPTION πΈ
so rlogind is literally the server for the rlogin(1) program. the way it works is it gives you a remote login facility, and the authentication is based on privileged port numbers coming from trusted hosts. iykyk. π₯
here's the options rlogind supports, no cap:
-aβ asks the hostname for verification. like, "hey bestie, is this really you?" π-hβ permits the use of superuser.rhostsfiles. yes, superuser. be careful bestie.-lβ prevents any authentication based on the user's.rhostsfile. but heads up: if the user is logging in as the superuser and the-hoption is used,.rhostsprocessing is still enabled. the plot thickens. π-Lβ prevents any authentication based on.rhostsorhosts.equivinformation. she's the strict one. iconic.-nβ disables keep-alive messages. silence. peaceful. π
lowkey important: the-h,-l, and-Lflags are not used if PAM (Pluggable Authentication Module) support is in use. in that case you can get the same effects by editing/etc/pam.conf. periodt. π
and another thing β the -h and -l options should also not be trusted without verifying that they actually work as expected with the particular version of libc installed on your system (and you should test them again after any libc update) because some versions of libc may not honor the internal flags used by rlogind. rude of them honestly. but the -L option bypasses the libc functions entirely, so it's not subject to this problem. slay. β¨
β οΈ okay real talk: the design of the.rhostssystem is COMPLETELY INSECURE except on a carefully firewalled private network. always use the-Loption under all other circumstances. ALSO, sincerloginddoes not encrypt communications, it should not, in general, be used at all. considerssh(8). i'm literally begging you. ππ
π§ the protocol, step by step π§
rlogind listens for service requests at the port indicated in the ``login'' service specification; see services(5). when a service request is received, the following protocol is initiated:
- the server checks the client's source port. if the port is not in the range
512-1023, the server aborts the connection. bye. π - the server checks the client's source address and requests the corresponding host name (see
gethostbyaddr(3),hosts(5)andnamed(8)). if the hostname cannot be determined, the dot-notation representation of the host address is used. if the hostname is in the same domain as the server (according to the last two components of the domain name), or if the-aoption is given, the addresses for the hostname are requested, verifying that the name and address correspond. normal authentication is bypassed if the address verification fails. π¨
π what happens next π
once the source port and address have been checked, rlogind proceeds with the authentication process described in rshd(8). it then allocates a pseudo terminal (see pty(4)), and manipulates file descriptors so that the slave half of the pseudo terminal becomes the stdin, stdout, and stderr for a login process. the login process is an instance of the login(1) program, invoked with the -f option if authentication has succeeded. if automatic authentication fails, the user is prompted to log in as if on a standard terminal line. main character energy. π
the parent of the login process manipulates the master side of the pseudo terminal, operating as an intermediary between the login process and the client instance of the rlogin program. in normal operation, the packet protocol described in pty(4) is invoked to provide ^S/^Q type facilities and propagate interrupt signals to the remote programs. the login process propagates the client terminal's baud rate and terminal type, as found in the environment variable TERM; see environ(7). the screen or window size of the terminal is requested from the client, and window size changes from the client are propagated to the pseudo terminal. π¦
transport-level keepalive messages are enabled unless the -n option is present. the use of keepalive messages allows sessions to be timed out if the client crashes or becomes unreachable. so if your laptop dies mid-session, at least the server notices eventually. π
π DIAGNOSTICS π
all initial diagnostic messages are indicated by a leading byte with a value of 1, after which any network connections are closed. if there are no errors before login is invoked, a null byte is returned as in indication of success. (yes, that's the original wording β "as in indication of success". we love a typo that survived since 1991. π)
- Try again. β a fork by the server failed. she tried. she really did. π
π SEE ALSO π
go read them. i'll wait. π«Ά
β BUGS β
okay the bug list is giving "we know, we know":
- the authentication procedure used here assumes the integrity of each client machine and the connecting medium. this is insecure, but is useful in an ``open'' environment. π«
- a facility to allow all data exchanges to be encrypted should be present. (spoiler:
ssh(8)exists now bestie) - a more extensible protocol should be used. π
π HISTORY π
the rlogind command appeared in 4.2BSD. a true vintage queen. π
and that's the whole page, bestie β brought to you by Linux NetKit (0.17), dated March 16, 1991. she's old, she's insecure, she's iconic. now go use ssh instead, fr fr. πβ¨π
π¦ where this page comes from
- epel 10: rsh-server 0.17-113.el10_2 Β· BSD-4-Clause-UC
- epel 9: rsh-server 0.17-102.el9 Β· BSD
- fedora 43: rsh-server 0.17-112.fc43 Β· BSD-4-Clause-UC
- fedora 44: rsh-server 0.17-113.fc44 Β· BSD-4-Clause-UC
- Copyright (c) 1983, 1989, 1991 The Regents of the University of California
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms