4 ms·
Wait, ssh doesn't let you specify the remote command without running it through the user's shell? That seems like a deficiency too IMHO.
by yjftsjthsd-h 2y ago
Wait, ssh doesn't let you specify the remote command without running it through the user's shell? That seems like a deficiency too IMHO.
- nurettin 2y agoIt is simpler to export paths locally, so the remote doesn't have to know your file/folder structure.
- yjftsjthsd-h 2y agoSure, it's convenient to have PATH, but why not have an optional way to say "hey, ssh, run /usr/bin/rsync on the remote with the following arguments, directly and without a shell please"? Equivalent to a Dockerfile containing cmd foo vs cmd ["/bin/foo"] (IIRC, at least - been a minute since I needed to do this.)
- pabs3 2y agoSee the OpenSSH bug above.
- kpcyrd 2y agoIt's a limitation in the ssh protocol. I wish they would fix it, but I'm not holding my breath. Trying to do anything about it would be a compatibility nightmare. If you need to pass data through ssh you're better off doing it through stdin.
- pabs3 2y agoSuggestion for adding it is here, basically they were skeptical there are use-cases for it: https://bugzilla.mindrot.org/show_bug.cgi?id=2283 https://bugzilla.mindrot.org/show_bug.cgi?id=2283
- blueflow 2y agoCommand strings must be expanded to an argument vector by some kind of shell. SSH itself does not allow to execute a program by argument vector like execv.
- deleted 2y ago[deleted]
- pjc50 2y agoThis is sort of a feature that allows for restricted shells such as menu systems.
- yjftsjthsd-h 2y agoIt seems like ForcedCommand should work regardless?