To disable Password Authentication after sshkey been added to home directory for user.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hope that this helps!
It happens to me as well. So, I search sshd_config first, and then I go to the directory like this.
find / -name sshd_config
The directory is /etc/ssh/sshd_config. Use the command below to go to the directory.
Once you go to the directory, you will see PasswordAuthentication No when you type the command below.
Hope my comment can help you:)
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
Join 1M+ other developers and:
Click below to sign up and get $100 of credit to try our products over 60 days!