Using ssl keys for access - C0ntr07/Firewalla-Information GitHub Wiki
Edit the /etc/ssh/sshd_config file, enter: $ sudo vi /etc/ssh/sshd_config
Find ChallengeResponseAuthentication and set to no:
ChallengeResponseAuthentication no Next, find PasswordAuthentication set to no too:
PasswordAuthentication no Search for UsePAM and set to no, too:
UsePAM no Finally look for PermitRootLogin and set to no too:
PermitRootLogin no Save and close the file. Reload or restart the ssh server on Linux:
/etc/init.d/ssh reload
We can use the systemctl command for systemd based Linux distros: $ sudo systemctl reload ssh
One can use the following on RHEL/CentOS Linux:
/etc/init.d/sshd reload
Again for systemd based distro such as CentOS/RHEL 7.x or the latest version of Fedora, try: $ sudo systemctl reload sshd
Step 5 – Verification Try to login as root: $ ssh [email protected] Permission denied (publickey).
Try to login with password only: $ ssh [email protected] -o PubkeyAuthentication=no Permission denied (publickey).