Remote login does not ask for the password. It appears directly without permission

I use openssh to remotely log in to my host and execute ssh root@ 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

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Site Moderator
Site Moderator badge
January 5, 2023

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:

Docs on how to add keys to existing servers:


Site Moderator
Site Moderator badge
January 4, 2023

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.

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

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel