Question
I cannot login to my user directly from SSH, `Permission denied (publickey).`.
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?
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.
×
There may be some issues like:
Please login with root user. Change your user password, then try to login using ssh with your User,
I presume this will help you.
Thanks in advance.