By Michael Xiao
I use openssh to remotely log in to my host and execute ssh root@188.166.217.201 Permission denied appears. I read your tutorial. The tutorial says that I will be asked for my password, but I have tried many times without a file asking for my password. It directly shows that I have no permission
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 @michaelxiao,
By default the DigitalOcean Droplets allow only SSHAuthentication and PasswordAuthentication is disabled.
If you want to turn on PasswordAuthentication, you’ll need to use the Recovery Console to enter your Droplet.
https://docs.digitalocean.com/products/droplets/how-to/recovery/recovery-console/
The Recovery Console provides out-of-band access and is available regardless of your network settings. It emulates the access you would have if you were sitting down with a keyboard and monitor attached to the actual server. You can use this feature to log in and revert bad settings to regain normal access.
Once inside, open the /etc/ssh/sshd_config and find the line #PasswordAuthentication No, you’ll need to remove the comment # and change No with Yes. Once done, save the file and restart your sshd service
service sshd restart
Hello @michaelxiao
The droplet was most probably created with only ssh-key access and with ‘Password Authentication’ disabled.
You can either enable ‘Password Authentication’ from the recovery console or upload your ssh-key to access your droplet.
Docs on how to create an ssh key:
https://www.digitalocean.com/community/tutorial_collections/how-to-set-up-ssh-keys
Docs on how to add keys to existing servers:
https://docs.digitalocean.com/products/droplets/how-to/add-ssh-keys/
Regards
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.