Why are the arguments supplied for the command run through ssh interpreted by shell before they are passed to the command on the server side?

Yuri yuri at rawbw.com
Mon Jan 13 06:29:16 AEDT 2020

Regardless of what the ssh specification says, the ability to run 
commands verbatim is very useful, and can be implemented with a new 
dedicated argument, for example -z. The specification can be like this:

              Disable argument expansion. When the command is run remotely,

              ssh passes arguments to the remote command verbatim, as they

              were supplied, without any expansions. If the command is a 

              path, it would be run on the target with the arguments as 
they were

              supplied. If the command is a relative path, it would be 
run in the

              user's home directory. Otherwise the command would be resolved

              through the PATH variable. In all cases, the arguments 
would be

              passed to the command exactly as they were supplied to the ssh



More information about the openssh-unix-dev mailing list