RSH(1)
๐ป RSH(1) โ bestie's guide to the remote shell ๐ป
okay so this is the rsh manual page, straight out of the General Commands Manual section 1, and i'm gonna walk you through it like we're texting at 2am ๐ซถ
โจ NAME โจ
rsh โ remote shell. that's it, that's the vibe. it runs a shell on another machine. main character energy fr ๐
โจ SYNOPSIS โจ
rsh [-Kdnx] [-l username] host [command]
yes bestie, all those flags are real, and yes, -K and -x are just sitting there in the synopsis like they own the place (spoiler: the description doesn't spell them out, so we don't either โ we report, we don't invent ๐ธ).
โจ DESCRIPTION โจ
So like, rsh executes command on host. that's the whole thing. iconic.
Here's the plumbing, and ngl it's kinda elegant: rsh copies its standard input to the remote command, and the standard output of the remote command gets copied back to its standard output, and the standard error of the remote command gets copied back to its standard error. it's giving relay race ๐โโ๏ธ
Interrupt, quit and terminate signals are propagated to the remote command. and rsh normally terminates when the remote command does โ like, it's loyal, it doesn't outlive its friend ๐
The options are as follows:
-dโ turns on socket debugging (usingsetsockopt(2)) on the TCP sockets used for communication with the remote host. deep lore for the network girlies ๐-lโ by default, the remote username is the same as the local username. the-loption allows the remote name to be specified. so like, you can be someone else over there. mysterious ๐-nโ redirects input from the special device/dev/null(see the โBUGSโ section of this manual page โ yes we're going there, brace yourself ๐ญ).
If no command is specified, you will be logged in on the remote host using rlogin(1). surprise! it's a whole different program. crossover episode ๐
๐ฆ the metacharacter situation ๐ฆ
this is the part everyone gets wrong, so pay attention bestie:
Shell metacharacters which are not quoted are interpreted on local machine, while quoted metacharacters are interpreted on the remote machine. iykyk, the quotes are doing SO much work here ๐
For example, the command
rsh otherhost cat remotefile >> localfile
appends the remote file remotefile to the local file localfile โ because that >> is unquoted, so your machine eats it. while
rsh otherhost cat remotefile ">>" other_remotefile
appends remotefile to other_remotefile โ because the quoted ">>" got shipped off to the remote side, so the remote shell reads it. literally the same three characters, completely different outcome. the quotes are the whole plot twist ๐
โจ FILES โจ
/etc/hosts
that's the list. one file. she's minimalist ๐
โจ SEE ALSO โจ
(yes, that's the whole list, including the trailing comma energy. we keep it real.)
โจ HISTORY โจ
The rsh command appeared in 4.2BSD. vintage! antique! a literal elder of the Unix world ๐
โจ BUGS โจ
okay bestie, sit down, this section is a mood ๐ญ
- If you are using
csh(1)and put arshin the background without redirecting its input away from the terminal, it will block even if no reads are posted by the remote command. If no input is desired you should redirect the input ofrshto/dev/nullusing the-noption. (this is why-nexists. it's not a cute extra, it's a survival tool ๐) - You cannot run an interactive command (like
rogue(6)orvi(1)) usingrshโ userlogin(1)instead. so no gaming or editing over here. wrong tool, bestie, wrong tool ๐ - Stop signals stop the local
rshprocess only; this is arguably wrong, but currently hard to fix for reasons too complicated to explain here. (the manpage literally says "reasons too complicated to explain here" and honestly? relatable. we've all been there ๐ญ)
๐ real talk: this is an old tool with real rough edges โ the bugs above aren't decorative, they're warnings. take them seriously, bestie.
and that's the page!! this one's from Linux NetKit (0.17), dated August 15, 1999 โ so if you see a timestamp that old, no you didn't, that's just how long these vibes have been immaculate ๐ฆโจ mwah ๐
๐ฆ 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) 1983, 1990 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