Last active
January 24, 2023 07:22
-
-
Save renbaoshuo/f4ba93f0cc895862a99c7daa8b61cffa to your computer and use it in GitHub Desktop.
This file contains 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 characters
#!/bin/bash | |
mkdir -p ~/.ssh | |
curl -s https://github.com/renbaoshuo.keys >> ~/.ssh/authorized_keys | |
sed -i 's|[#]*PasswordAuthentication yes|PasswordAuthentication no|g' /etc/ssh/sshd_config | |
sed -i 's|UsePAM yes|UsePAM no|g' /etc/ssh/sshd_config | |
echo "PubkeyAcceptedKeyTypes=+ssh-rsa" >> /etc/ssh/sshd_config | |
systemctl restart ssh.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment