REXECD(8)
β¨ REXECD(8) β¨ β the remote execution server π
okay bestie, buckle up, this one's a classic β it's a page from the System Manager's Manual and it's literally called rexecd, which is short for "remote execution server" π«Ά no cap, that's the whole name.
SYNOPSIS πΈ
rexecd [ -D ]
like, that's it. one binary, one optional flag, maximum main character energy π
OPTIONS β¨
bestie there is exactly one option here, we love a low-maintenance queen:
-Dβ turns off reverse DNS lookup, and instead the log will use the client's IP addresses. so no cute hostnames in the log, just raw numbers, but it's faster. it's giving "i don't need to know your name, i just need your digits" π
DESCRIPTION π
so rexecd is the server half of the rexec(3) routine. it does remote execution, and it authenticates people using user names and passwords. classic. iconic. slightly cursed but we move.
rexecd sits and listens for service requests on the port that's spelled out in the ``exec'' service specification β go peek at services(5) if you wanna know the deets, iykyk.
the second a service request shows up, this whole protocol kicks off, in order, no skipping steps:
- the server reads characters off the socket until it hits a NUL (
'\0') byte. whatever string comes out gets interpreted as an ASCII number, base 10. numbers era π’ - if that number from step 1 is non-zero, it's read as the port number of a secondary stream, and that stream gets used for stderr. a second connection gets created to that port on the client's machine β but only after the user, password, and command have been received and authenticated from the client.
- a NUL-terminated user name gets retrieved on the initial socket. max length? 16 characters, bestie, don't push it.
- a NUL-terminated, unencrypted password gets retrieved on the initial socket too. also max 16 characters. yes i said unencrypted, we'll get to that in BUGS, hold on π
- a NUL-terminated command gets retrieved on the initial socket, and it's headed straight to a shell. the command's length is limited by the upper bound on the size of the system's argument list. so, y'know, don't write a novel in there.
rexecdthen validates the user exactly like it's done at login time, and if the auth slayed, it changes into the user's home directory and sets up the user and group protections for that user. if any of these steps fail, the connection gets aborted and a diagnostic message gets sent back. no partial credit, periodt.- a NUL byte gets returned on the initial socket, and then the command line gets handed off to the user's normal login shell. that shell inherits the network connections that
rexecdset up. passing the aux cord, fr fr π§
DIAGNOSTICS π©Ί
okay so, except for the last one in this list, every diagnostic message gets returned on the initial socket, and after that all network connections get closed. an error is signaled by a leading byte with a value of 1 β and 0 is what gets returned in step 7 above when everything before the command execution succeeded. so 0 = good, 1 = we have a problem π
username too longβ the name is longer than 16 characters. girl, shorten it.password too longβ the password is longer than 16 characters.command too longβ the command line you passed exceeds the size of the argument list (as configured into the system).Login incorrect.β either there was no password file entry for that user name, or the wrong password was supplied. we don't know which and it's not telling you, for security reasons β¨No remote directory.β thechdircommand to the home directory failed. the vibes were not found π₯²Try again.β aforkby the server failed. it's not you, it's the process table.<shellname>: ...β the user's login shell could not be started. this message comes back on the connection associated with the stderr, and it is not preceded by a flag byte. special little snowflake, different rules π
SEE ALSO π
rexec(3)β go read it, bestie, it's the other half of this situationship π«Ά
BUGS π
there should be a facility that allows all data and password exchanges to be encrypted. it's not here. it should be present. it is not. we're just saying it out loud. π
HISTORY π¦
the rexecd command first appeared in 4.2BSD. ancient. vintage. still here. she's a legend for real π
and that's the whole page, bestie!! this one's from the Linux NetKit (0.17) era and it's dated March 16, 1991 β so yes, it's older than literally everyone you know, and it still runs. slay, queen, we stan a survivor πβ¨ππ¦πΈπ π«Ά
π¦ 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, 1991 The Regents of the University of California
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms