I tried to connect to a linux server with rsa cert via ssh. What I did:
Create private key (test_priv.ppk) and public key (test_pub) with puttygen (in windows server)
Copy the public key to the linux server as user1, convert it
Code:
ssh-keygen -if test_pub >> test_pub_new
cat test_pub_new >> .ssh/authorized_keys
as root
Code:
chmod 600 /home/user1/.ssh/
chmod 700 /home/user1/.ssh/authorized_keys
I uncomment below in /etc/sshd/sshd_config
Quote:
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
|
On win server, I add test_priv.ppk as authentication file for putty (SSH > Auth)
Restarted sshd on linux server, but I still got "Server refused our key" when I log in as user1