remote command word splitting

Darren Tucker dtucker at
Thu Dec 2 14:31:59 EST 2004

Frederik Eaton wrote:
> Hmm. So, while I'm no longer as enthusiastic as I was about this idea,
> I still wonder if it wouldn't be cleaner if there were a way to get
> ssh to preserve the separation between remote command arguments
> itself, rather than asking the user to do protective quoting. How
> about an option to ask ssh to use 'execvp' rather than a shell? Then I
> could do

The SSH protocol sends the command as a single string, so you'd still 
have to dequote somehow to create the argv list to pass to execvp().

You'd also have to set up the user's environment (PATH and whatnot), 
which probably involves parsing various startup files.  Hey, that sounds 
a lot like what a shell does...

Darren Tucker (dtucker at
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
     Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.

More information about the openssh-unix-dev mailing list