Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
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 firstname.lastname@example.org # 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.
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 email@example.com 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.×