How to disable password login via ssh
If you enter your server with user & password without advanced security setup, you probably will face someday someone will enter your server due to that bots continually try user & password combinations 🤖
In order to enter remotely to your servers with dynamic IP, the best is to use a private key.
Disable password login
✍️ Edit the file /etc/ssh/sshd_config
running:
sudo nano /etc/ssh/sshd_config
Search the line:
PasswordAuthentication yes
👁 just change yes
to no
PasswordAuthentication no
👌 The last step, restart the ssh
service to apply now the changes:
sudo service ssh restart
Leave a comment with your question or doubt 👋