News for hackers. Stuff that matters.
Re:SSH quoting by Izkata on Saturday June 12, 2021 @01:58PM (#27486233)
ssh has "-n" which I think stops that. It's worked for me most of the time when I end up with that or a similar situation (the once or twice it didn't IIRC involved experiments with chaining ssh commands).
Re:SSH quoting by jlokier on Saturday June 12, 2021 @06:55PM (#27488098)
No, "-n" has the opposite effect to the one desired. "-n" is for when you have a server-side command that reads standard input and you want to prevent it from reading from the client side. "-n" cuts off the standard input so the server-side command reads empty input (/dev/null).

The desired effect is when you want the server-side script to read input from the client environment. For example so you can give answers to questions, or interact with a terminal program. That's broken by piping $script in as input, and it's also broken by "-n".