Comment by blueflow
6 days ago
> ssh unquotes it
ssh does not unquote. Its the local shell, if you are invoking ssh via execv, this does not apply.
6 days ago
> ssh unquotes it
ssh does not unquote. Its the local shell, if you are invoking ssh via execv, this does not apply.
So instead of unquoting your data itself, ssh invokes another program to unquote it. That's a distinction without a difference.
No, ssh is called by the local shell. ssh never gets to see the quoted value that you typed in your shell. This mechanism is unrelated to ssh, at all:
You see the double quotes go missing.
This happens as part of the shell turning the command string into argument vectors to pass to execv().
When I run:
ssh foo@bar "echo 'hello world'"
ssh chooses to unquote the string: echo 'hello world'
splitting it into two parts (echo, and hello world), and then running the program echo with the argument hello world.
The fact it does this via a separate program is irrelevant.
4 replies →