Report this

What is the reason for this report?

I cannot login to my user directly from SSH, `Permission denied (publickey).`.

Posted on May 14, 2017

Hello I have been using DigitalOcean for couple of months for my Python Flask project. I usually starts my Droplet creation with these commands.

# In my local computer.
ssh root@123.123.123.123
# In droplet.
adduser user_test
usermod -aG sudo user_test
su - user_test
# Logged in into user user_test.

I used DigitalOcean since last year November and then stopped using DigitalOcean for the last two months. I am pretty sure after the commands above I can directly connect into user user_test with this command.

ssh user_test@123.123.123.123

However today login with such command now results in Permission denied (publickey).. If I want to login into user_test I need to login from root.

ssh root@123.123.123.123
su - user_test

Is there any steps I missed those make me unable login directly to user?

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.