OpenSSH with authentication key instead of password on Debian Squeeze/Wheezy/Derivatives

Generate the authentication public key on the Client

User@Client:~# ssh-keygen

Install the public key on the server

User@Client:~# ssh-copy-id -i /path/to/what/ever/id_rsa.pub user@server.tld

Or

User@Client:~# ssh-keygen -t rsa

Copy the public key to the server

User@Client:~# scp .ssh/id_rsa.pub user@server:/path/to/what/ever

Install the public key on the server

User@Server:~# cat /path/to/what/ever/id_rsa.pub >> .ssh/authorized_keys

server configuration (should not be needed today)

nano /etc/ssh/sshd_config
PubkeyAuthentication yes

to disable password login

PasswordAuthentication no

further info
SSH with authentication key instead of password
SSH

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.