Passwordless access, Raspbian Buster, Raspberry Pi

Forbid password authorization:
sed "s|^.*PasswordAuthentication .*$|PasswordAuthentication no|" /etc/ssh/sshd_config | grep PasswordAuthentication
sed -i "s|^.*PasswordAuthentication .*$|PasswordAuthentication no|" /etc/ssh/sshd_config
Install public key:
mkdir -p ~/.ssh
echo "" > ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys

1 comment: