0

All servers support the ssh public key authentication only in my environment. When I read the ssh debug info, I notice the "Offering RSA public key" is different.

When I ssh server1 from host1

user@host1:~$ ssh -v server1
...
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/user/.ssh/online.pem
debug1: Authentications that can continue: publickey
debug1: Offering RSA public key: /home/user/.ssh/id_rsa

However, when I ssh to server2 from host2

user@host2:$ ssh -v server2
...
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: jumpbox    <-- even not a file

Which ssh/sshd config item will affect the RSA public key offering method? Unlucky, the server1 and server2 are in isolated networks, so I can't ssh server2 from host1 or ssh server1 from host2 to eliminate some factors.

da_miao_zi
  • 113
  • 3

1 Answers1

1

That should be the ~/.ssh/config file on your machine. It should contain a section for server2 with an option for the identity file.

Gerald Schneider
  • 23,274
  • 8
  • 57
  • 89
  • Nope, the `~/.ssh/config` only contains 2 lines `Host host2` and `user user` in host2, and `~/.ssh/config` is an empty file in host1. – da_miao_zi Jun 16 '22 at 10:03