in reply to Re^3: Establishing SSH tunnel and opening another SSH connection through it
in thread Establishing SSH tunnel and opening another SSH connection through it

And specific issue I *think* is that it adds "PreferredAuthentications=keyboard-interactive,password" which probably results in not being able to auth against "relay" host with public key auth. If both relay and dest hosts had same type auth - either both pub key or both password then this would not be a problem.
# call args: ['ssh','-o','CheckHostIP no','-o','ConnectionAttempts 2', +'-o','ForwardAgent yes','-o','HashKnownHosts no','-o','StrictHostKeyC +hecking=no','-o','VerifyHostKeyDNS no','-o','UserKnownHostsFile /dev/ +null','-o','ConnectTimeout 15','-o','HostbasedAuthentication no','-o' +,'ChallengeResponseAuthentication no','-o','RhostsRSAAuthentication n +o','-o','GSSAPIAuthentication no','-vvv','-o','PasswordAuthentication + yes','-o','PubkeyAuthentication yes','-o','PreferredAuthentications= +publickey,password','-o','NumberOfPasswordPrompts=2','-o','ProxyComma +nd=ssh root@192.168.1.1 nc %h 22','-o','ServerAliveInterval=30','-x2M +N','-o','NumberOfPasswordPrompts=1','-o','PreferredAuthentications=ke +yboard-interactive,password','-S','/root/.libnet-openssh-perl/root-XX +XXX','-l','root','10.20.30.40','--']
  • Comment on Re^4: Establishing SSH tunnel and opening another SSH connection through it
  • Download Code