The first command of a nested compound command receives no arguments

Christian Weisgerber naddy at mips.inka.de
Mon Oct 22 07:38:08 AEDT 2018


On 2018-10-21, Colin Watson <cjwatson at debian.org> wrote:

> This is an oversimplification.  It's an SSH thing to the extent that the
> SSH protocol defines that command execution is done by passing a single
> command string, the ssh client specifically joins its arguments using
> spaces in order to send them to the server,

That behavior was inherited straight from rsh(1), which was really
just a wrapper around rcmd(3).  This whole thing goes back to 1982.
https://svnweb.freebsd.org/csrg/usr.bin/rsh/rsh.c?view=log

Nowadays people may not be aware that one of the selling points of
ssh was that it was a drop-in replacement for rsh/rlogin/rcp.

-- 
Christian "naddy" Weisgerber                          naddy at mips.inka.de


More information about the openssh-unix-dev mailing list