|
|
|
|
|
by JeremyNT
1058 days ago
|
|
> This is required to restrict users to certain commands with special shells like scponly or rbash. I don't think this is some specific design goal of OpenSSH, I think it's just a side effect of how shell escaping works. > When you keep in mind that the given command string will be parsed twice, first by your local shell and then again by the remote shell, it becomes clear why a running a remote ssh command behaves like this. I get that this behavior may be surprising to new users, but anybody working with ssh regularly will encounter these kinds of escaping issues. SSH isn't even the only place you'll encounter this. Things like docker etc will have the same "problem". In the case of ssh you can simply write your commands to a file and send them via stdin, or copy a script to the target. The tone of this blog post rubs me wrong. Yes this is a footgun (in the same way many POSIX shell-related things are), but it's not like it's some "problem" with the design of SSH. |
|