passh
passh copied to clipboard
support multiple prompts with different passwords
It you are prompted for the same password more than once, it works. But if you are prompted for different passwords I have not made it work. In my specific use case, trying to ssh to host B through jump-host A, where the A and B's password are different.
I prefer -p env so something like this:
SSHPASSA=$(...) \
SSHPASSB=$(...) \
passh -c1 -C -t10 -T -p env:SSHPASSA,SSHPASSB \
ssh -o "ProxyJump a" b
As in your example, you are using 4 options: -c1 -C -t10 -T. When we add support for multiple passwords it'll become difficult to interpret these options in a way which makes sense for all use cases. I'd suggest you try my sexpect. I use it almost every day. :)