doke has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to use Net::OpenSSH with the ssh -oProxyJump=user@bastionhost option to jump the connection through an intermediate bastion host. However, I can't get the authentication to work. The built in authentication only does one password prompt. So I'm trying to use login_hander => custom_login_hander option, and a custom handler subroutine that recognizes the password prompt and gives the right password for that stage. It works for the first hop. However, Net::OpenSSH seems to only fire the custom handler once. It seems to never call it on the second password prompt. Can anyone suggest anything?
I've got a workaround of calling the ssh binary, with the flags I need, and Expect-ing my way through the prompts. But it seems overly complicated.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Net::OpenSSH and ProxyJump auth
by talexb (Chancellor) on Jul 24, 2025 at 13:25 UTC | |
Re: Net::OpenSSH and ProxyJump auth
by Anonymous Monk on Jul 23, 2025 at 08:34 UTC | |
by doke (Initiate) on Jul 23, 2025 at 19:15 UTC | |
by Anonymous Monk on Jul 24, 2025 at 13:46 UTC | |
by doke (Initiate) on Jul 25, 2025 at 13:32 UTC |