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!
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.
Enter your email to get $200 in credit for your first 60 days with DigitalOcean.
New accounts only. By submitting your email you agree to our Privacy Policy.
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
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