Saturday, October 23, 2010

allow ssh via authorized keys

First we have to check the following settings

on your server /etc/ssh/sshd_config
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys

PermitRootLogin yes
PasswordAuthentication yes

After that on your client computer you need to generate ssh public key using dsa or rsa

#ssh-keygen -t rsa

this key will automatically generate and store on your /home/user/.ssh/id_rsa.pub
copy the content and paste on your server /root/.ssh/authorized_keys

please note that your root permission should be correct

you can check your log file on location /var/log/auth.log

No comments:

Post a Comment