By efbergh
To disable Password Authentication after sshkey been added to home directory for user.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi ebbergh,
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.
cd /etc/ssh/
Once you go to the directory, you will see PasswordAuthentication No when you type the command below.
Pico sshd_config
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
Hello all,
/etc/ssh/sshd_configHope that this helps! Regards, Alex
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.