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?

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



This is perhaps a problem with the documentation.


This command:

$ ssh <remote-host-name> echo  '`hostname`'

gets the strings "echo" and "`hostname`" as arguments, but on the server side "echo" is run with the argument "remote-host-name".


The ssh manpage says:

> If a command is specified, it is executed on the remote host instead of a login shell.


If "echo" is interpreted as a login shell, who interprets "`hostname`" as "remote-host-name" then, and why?

I found that in order to pass the string to the command run on the remote host verbatim it is necessary to escape every character in it, but it isn't clear why should this be necessary.


Perhaps this should be explained in the manpage.


Yuri


_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev




[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux