Suppose I am on computer A and eventually I want to ssh into server C. However, server C has IP restrictions so I have to ssh to server B first as a gateway.
The situation is:
1) if I first ssh into server B, and ssh into server C under the shell of server B, I could get in.
2) if I use the method in this post (I tried both answers, by ephemient and by Wesley), then I got a "timed out".
When I use ssh -vvv, the ssh stuck at
debug1: Offering RSA public key: ****
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug2: input_userauth_pk_ok: fp SHA256:****
debug3: sign_and_send_pubkey: RSA SHA256:****
when using key authentication. And ssh would stuck at
debug2: we sent a password packet, wait for reply
when using password authentication.
Interestingly, when I input an incorrect password, the remote host can find that out and prompt me to enter password again.
Does any one know what could be the possible reason for this time out? Thanks!