Created
October 3, 2020 03:48
-
-
Save moeiscool/c0ace30e0a25676289bc507205a917a8 to your computer and use it in GitHub Desktop.
Revisions
-
moeiscool created this gist
Oct 3, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ 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