Categories
Uncategorized

SSH: Login without a password

1.- On client computer, create private/public keys: Accept all defaults

ssh-keygen -t rsa

2.- copy public key to remote host

ssh-copy-id -i ~/.ssh/id_rsa.pub  remotehost

3. test

ssh remotehost

4.- Disable Password login, edit /etc/ssh_config

Find PasswordAuthentication

Change it from #PasswordAuthentication yes to PasswordAuthentication no

5.- Restart sshd

systemctl restart sshd