I cant find the line "PasswordAuthentication no " with sudo nano /etc/shh/shhd_config command

October 4, 2017 576 views
Security Ubuntu 16.04

To disable Password Authentication after sshkey been added to home directory for user.

1 Answer

Instead using nano when you can't find that line try to grep that string to find out if it's really there (Maybe you can't see it ;) )

grep -n PasswordAuthentication  /etc/ssh/sshd_config

It will give you also the line number in file where it is exactly. If there will be nothing, so just try to put that parameter to that file and restart sshd

Have another answer? Share your knowledge.