Question
Cannot login to server as non-root user (Permission denied (publickey))
I have created a Droplet and connect to it passwordless via SSH as root. While logged in as root, I created a new user ‘deploy’ which I want to use to deploy my app.
But, when I try to 'ssh deploy@ipaddr’ I get this error message: Permission denied (publickey)
.
I’m guessing it’s trying to authenticate with my root key instead of asking me for the deploy users password. How can I get around this little issue?
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.
×