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?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi @SaboteurKid,
Check if user has bee allowed Please make sure your user does have SSH enabled. If you haven’t try the following
echo "AllowUsers NewUser" >> /etc/ssh/sshd_config
and then
service sshd restart
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
PubKeyAuthentication Yes
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
ssh -i ~/.ssh/private_key newuser@DropletIp
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
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.