PUBLICKEY="YOUR_PUBLIC_KEY_HERE" echo "ssh-rsa $PUBLICKEY" >> ~/.ssh/authorized_keys cat ~/.ssh/authorized_keys sed -i 's/UsePAM yes/UsePAM no/g' /etc/ssh/sshd_config sed -i 's/ChallengeResponseAuthentication yes/ChallengeResponseAuthentication no/g' /etc/ssh/sshd_config sed -i 's/PasswordAuthentication yes/PasswordAuthentication no/g' /etc/ssh/sshd_config service sshd restart