News for hackers. Stuff that matters.
Re:FreeBSD deprecates all r-cmds (rcp, rlogin, etc.) by raldi on Wednesday July 05, 2017 @12:19AM (#14699961)
I guess at this point I'm never going to learn the difference between rlogin, rsh, and rexec. Even googling it and reading the first page of results doesn't clear things up.
Re:FreeBSD deprecates all r-cmds (rcp, rlogin, etc.) by tyingq on Wednesday July 05, 2017 @08:15AM (#14701750)
==Rsh vs rlogin==

Rsh was made to run a remote command without a login shell. Like rsh remotehost <command>. If you omit <command> rsh does an execv() of rlogin.

==Rsh vs Rexec==

Rexec allows you to specify a password on the command line, rsh does not...it expects you to either use .rhosts, or enter the password interactively. Rexec also doesn't have the functionality where it invokes rlogin if you omit the command...the command is mandatory.

==Why?==

No idea. Yes, it's odd that it wasn't all made as a single client binary. There were also different daemons on the server side...rexecd, rshd, rlogind. Also fun, there was often another binary called rsh that had nothing to do with this rsh or remote logins. It was a restricted login shell so that you could have limited rights users.

Re:FreeBSD deprecates all r-cmds (rcp, rlogin, etc.) by killerbat00 on Wednesday July 05, 2017 @12:49AM (#14700033)
A comment below explains exactly this: https://news.ycombinator.com/item?id=14699219
Re:FreeBSD deprecates all r-cmds (rcp, rlogin, etc.) by raldi on Wednesday July 05, 2017 @12:56AM (#14700054)
No it doesn't. It explains what the three as a group do; what I'm asking is, what's the difference between these three? Why did we need three separate commands? When (in the pre-SSH days) would you use one versus the others?
Re:FreeBSD deprecates all r-cmds (rcp, rlogin, etc.) by yrro on Wednesday July 05, 2017 @11:52AM (#14703428)
I'd assume rexec runs a command on a remote host non interactively; rsh runs an interactive shell on a remote host; and rlogin allows you to interact with login(1), again on a remote host. But I've not read the man pages as I'm on my phone.
Re:FreeBSD deprecates all r-cmds (rcp, rlogin, etc.) by the_mitsuhiko on Wednesday July 05, 2017 @02:06AM (#14700244)
SSH also brings these separate commands and a few more. ssh, slogin, scp, sshd, and sftp.
Re:FreeBSD deprecates all r-cmds (rcp, rlogin, etc.) by raldi on Wednesday July 05, 2017 @02:10AM (#14700259)
Okay, but that's not the question I'm asking.
Re:FreeBSD deprecates all r-cmds (rcp, rlogin, etc.) by sigjuice on Wednesday July 05, 2017 @02:19AM (#14700289)
Each of these FreeBSD commands have man pages which your googling should have shown.
Re:FreeBSD deprecates all r-cmds (rcp, rlogin, etc.) by raldi on Wednesday July 05, 2017 @02:22AM (#14700297)
slogin is just a symlink to ssh, and sexec does not exist. So the s-commands' manpages tell me nothing about the difference between rsh, rlogin, and rexec, or why all three needed to be created.
Re:FreeBSD deprecates all r-cmds (rcp, rlogin, etc.) by sigjuice on Wednesday July 05, 2017 @02:25AM (#14700305)
rsh, rlogin and rexec each have their own man pages, which you should be able to find on freebsd.org if google is being difficult.
Re:FreeBSD deprecates all r-cmds (rcp, rlogin, etc.) by JdeBP on Wednesday July 05, 2017 @03:01AM (#14700405)
The irony here is that these manual pages are the very things being patched in the headlined message. Their exact locations in the source tree, and some of their contents, are right there in front of us.
Re:FreeBSD deprecates all r-cmds (rcp, rlogin, etc.) by sigjuice on Wednesday July 05, 2017 @03:08AM (#14700429)
So read the older man pages? Why is this a problem? You can also easily read the man pages for a specific version of FreeBSD here https://www.freebsd.org/cgi/man.cgi
Re:FreeBSD deprecates all r-cmds (rcp, rlogin, etc.) by raldi on Wednesday July 05, 2017 @02:32AM (#14700320)
Right. They say that rsh can be used to get a login or run a command on a remote host. So why do the other two commands exist? In what situations would a person have wanted to use rlogin or rexec instead of rsh?
Re:FreeBSD deprecates all r-cmds (rcp, rlogin, etc.) by sigjuice on Wednesday July 05, 2017 @03:04AM (#14700416)
Maybe rexec appeared first? And when rsh arrived later, they still kept rexec around? Perhaps they had a lot of shell scripts that contained "rexec" and didn't want to bother changing them to "rsh"? The actual reason is probably so mundane that maybe there is no accurate historical information on this topic.
Re:FreeBSD deprecates all r-cmds (rcp, rlogin, etc.) by reacweb on Wednesday July 05, 2017 @05:43AM (#14701044)
rlogin's aim is to open an interactive session with a remote host. rsh can do that also but is mainly used to run a command remotely. Access control is generally configured on the remote host using a file named .rhosts. If there is no authorisation in .rhosts, rlogin will ask for the password.

rexec is used to launch a remote command using a login and a password. For convenience, these passwords can be stored locally in a file named .netrc.