Hi guys,
Currently I’m facing a problem that is I cannot ssh into a server with floating ip using sudoer user.
I can:
ssh root@$DROPLET_IP
But when I try to
ssh user_abc@$DROPLET_IP #out: Permission denied (publickey)
I had check user and user folder (as root).
su $sudoer_user
groups wheel # output: user_abc wheel
cat /home/user_abc/.ssh/authorized_keys # output exactly the same with root user
Can anyone help me?
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.
Click below to sign up and get $100 of credit to try our products over 60 days!
Hi @SaboteurKid,
Check if user has bee allowed Please make sure your user does have SSH enabled. If you haven’t try the following
and then
The above should help out with the newuser not being allowed.
Check your SSH Config The next suggestion is a long shot but please check in your /etc/ssh/sshd_config you have the following line
This will allow you to connect with a public key to your droplet.
Local SSH key used Another possible issue would be your local terminal using the wrong SSH keys. Try to SSH like so
Where
~/.ssh/private_key
would be the path to your local SSH keys you want to use.DigitalOcean article
Lastly, please check this article - https://www.digitalocean.com/docs/droplets/how-to/add-ssh-keys/to-existing-droplet/ and make sure you have followed it to add the SSH key for your user. Of course, you’ll need to change of your .ssh folder to your root user’s directory.
Regards, KDSys