ssh-keygen -t rsa #-t means encryption method #The save path and short password confirmation will appear afterwards, just press Enter all the way


cd /root/.ssh


mv authorized_keys #renaming


Download id_rsa to local


Modify /etc/ssh/sshd_config


Disable password verification


PasswordAuthentication no


Enable key verification


RSAAuthentication yes


PubkeyAuthentication yes


Restart the SSH service


service sshd restart #centos system


service ssh restart #ubuntu system


/etc/init.d/ssh restart #debian system

Hai trovato utile questa risposta? 268 Utenti hanno trovato utile questa risposta (1132 Voti)