DEV Community

Ibrar Hussain
Ibrar Hussain

Posted on • Originally published at Medium

5 1

Resolving SSH Permission Denied Errors Due to OpenSSH Version Vulnerabilities

If you have encountered errors while using SSH, such as the ones below:

Example 1:

foo@12.34.56.789: Permission denied (publickey).
Enter fullscreen mode Exit fullscreen mode

Example 2:

sign_and_send_pubkey: no mutual signature supported
foo@12.34.56.789: Permission denied (publickey).
Enter fullscreen mode Exit fullscreen mode

It's possible that you may be using an older version of OpenSSH on your server that is vulnerable to the SHA-1 algorithm, which was disabled in OpenSSH version 8.8 (2021-09-26). If you're certain that you've correctly added the public key to your server, this could be the cause of the error messages.

To determine your local OpenSSH version, enter the following command:

ssh -vv local
Enter fullscreen mode Exit fullscreen mode

The result should look like this:

OpenSSH version

To resolve the issue, add PubkeyAcceptedKeyTypes +ssh-rsa to your Host entry in the ~/.ssh/config file. It should look like this:

Host fooServer
PubkeyAcceptedKeyTypes +ssh-rsa
Hostname 12.34.56.789
User forge
IdentityFile=~/.ssh/id_rsa
Enter fullscreen mode Exit fullscreen mode

After making these changes, try again and the issue should be resolved.

Image of AssemblyAI

Automatic Speech Recognition with AssemblyAI

Experience near-human accuracy, low-latency performance, and advanced Speech AI capabilities with AssemblyAI's Speech-to-Text API. Sign up today and get $50 in API credit. No credit card required.

Try the API

Top comments (0)

Cloudinary image

Video API: manage, encode, and optimize for any device, channel or network condition. Deliver branded video experiences in minutes and get deep engagement insights.

Learn more

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay