Setting up SSH public key authentication on Raspberry Pi
I followed this guide to setup SSH public key authentication.
First copy your public SSH key to the destination host
# The destination user
export USER=pi
# The destination host
export HOST=192.168.0.13ssh-copy-id $USER:$HOSTThen test if you can now connect to the destination host without needing to enter a password
ssh $USER@$HOSTIf this works, you can safely edit the destination hosts’ SSH configuration file to disable password authentication as a whole
sudo vi /etc/ssh_sshd_configSearch for the line containing PasswordAuthentication and change this line to
PasswordAuthentication no