4 ms·
Honestly, I hope am answer to that question is never posted on stack overflow. As for an answer, i think something like cat passwd.txt - | ssh Might work
by rocqua 7y ago
Honestly, I hope am answer to that question is never posted on stack overflow.
As for an answer, i think something like
cat passwd.txt - | ssh
Might work. Didn't test it though. The cat outputs all arguments in order, and - is stdin.
- marcosdumay 7y agoThis one doesn't work.
- rocqua 7y agoWhy not?
- clarry 7y agossh probably doesn't read the password from stdin.
- buckminster 7y agoThis is also a really annoying habit: giving a crap answer and then demanding an explanation of how it fails. The meta-answer: if it was this easy people wouldn't keep asking about it. For decades now! When I tried it fifteen years ago ssh insisted on reading the password from keyboard input, not stdin.
- rkeene2 7y ago> Why not? SSH reads the password from the terminal, otherwise it couldn't read the password on a piped input
- LeoPanthera 7y agossh doesn't accept the password from stdin. Don't just guess if you don't know. That's worse than not helping at all.