I googled and tried for over 30 minutes, but I didn't find this usecase and thus didn't manage to get it working. Probably I used the wrong keywords.
Using ssh -i privkey user@jumphost.org
works. ssh asks for password of privkey. After entering password for privkey
, connection is established.
Using
ssh -i privkey user2@targethost.org -J user@jumphost.org
ssh prompts for password of user@jumphost.org. After entering password for user@jumphost.org password for privkey
is asked and connection is established.
I'd like to enter the password for privkey
when establishing the connection once and then using it for both servers. What am I doing wrong?
using -v
option for ssh it looks like ssh is ignoring the -i
option for jumphost.org
debug1: Offering public key: /home/user3/.ssh/id_rsa RSA SHA256:XXXXXXX
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /home/user3/.ssh/id_dsa
debug1: Trying private key: /home/user3/.ssh/id_ecdsa
debug1: Trying private key: /home/user3/.ssh/id_ed25519
debug1: Trying private key: /home/user3/.ssh/id_xmss
debug1: Next authentication method: password
user@jumphost.org's password: