Skip to Content

Enable SSH Key based authentication and Disable Password Authentication in ssh

Hardening Authentication in SSH.

  • Enable SSH Key based authentication
  • Disable Password Authentication in sshd configuration file
 

root@gateway :vi /etc/ssh/sshd_config

PubkeyAuthentication yes

# To disable tunneled clear text passwords, change to no here!

PasswordAuthentication no

:wq

root@gateway : service sshd restart