I have a server that I log in with SSH and I use key based authentication. I now set up a second server and I want to use the same key for login.
Thus, I copied the file
~/.ssh/authorized_key from the old server to the new server.
On the Windows client, I cloned the SSH configuration in Putty and only exchanged the IP address of the server.
This does not seem to be sufficient. The error message of Putty on Windows is
PuTTY Fatal Error
Disconnected: No supported authentication methods available (server sent: publickey)
And on the SSH console I see
Server refused our key
The server configuration is
AllowGroups sshlogin Port 2233 PermitRootLogin no PasswordAuthentication no ChallengeResponseAuthentication no
Even if I copy the other key files (
id_rsa.pub), I still can't login.
# ls -l total 12 -rw------- 1 root root 411 Jan 14 22:39 authorized_keys -rw------- 1 root root 1792 Jan 14 22:53 id_rsa -rw------- 1 root root 411 Jan 14 22:39 id_rsa.pub
Which files do I need to copy to get an identical SSH login on both machines?
I have tried:
- Can't make a 2nd ssh key login, but it's about 2 different keys on 1 server. I need 1 identical key on 2 servers.