i have a strange issue, started a new droplet, everything basic with an ssh-rsa kay attached, i can log in via ssh just fine, but when i try to use a application that utilizes a ssh tunnel … Like navicat sql or a sftp client, i’m getting a pubkey or a general access denied erro. i have done this with quite alot of servers already, made sure permissions are correct, the keys are valid, sshd config is pretty much out of the box (i just disabled password auth and PAM use)
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!
Accepted Answer
Hello,
I’ll recommend you to check the logs in /var/log/auth.log
or /var/log/secure
(depending on your Linux distro):
sudo tail -f /var/log/auth.log
Some commond errors can be:
Authentication refused: bad ownership or modes for directory
- Incorrect permissions.Failed publickey for user
- Incorrect SSH key or user settings.You can ensure that your SSH key permissions are set correctly on your local machine. Permissions for the SSH key must be restrictive:
Private Key: Should be readable only by your user.
chmod 600 ~/.ssh/id_rsa
chmod 644 ~/.ssh/id_rsa.pub
SSH Directory: Should be accessible only by your user.
chmod 700 ~/.ssh
Check permissions on your server as well:
Authorized Keys: Should be readable only by the user.
chmod 600 ~/.ssh/authorized_keys
Regards
Heya,
Are you sure that the Apps you are using are actually getting the proper key to use?
I’ve had instances where I couldn’t connect just because the APP I was using didn’t get the proper key.
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.