passh icon indicating copy to clipboard operation
passh copied to clipboard

support multiple prompts with different passwords

Open dxlr8r opened this issue 9 months ago • 1 comments

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

dxlr8r avatar Mar 17 '25 15:03 dxlr8r

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. :)

clarkwang avatar Mar 18 '25 15:03 clarkwang