Created
March 9, 2024 15:08
-
-
Save hyunbinseo/8f1af453c8440d777d3987d56f2dd3ba to your computer and use it in GitHub Desktop.
Disable password authentication in Ubuntu 22.04 (Vultr instance)
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
cd /etc/ssh | |
sudo nano sshd_config | |
# PasswordAuthentication no | |
# Remove the leading pound sign | |
cd sshd_config.d | |
ls # 50-cloud-init.conf | |
sudo nano 50-cloud-init.conf | |
# PasswordAuthentication yes | |
sudo rm 50-cloud-init.conf | |
# passwordauthentication no | |
sudo sshd -T | grep passwordauthentication | |
sudo systemctl restart ssh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment