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