You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
'Permission denied (publickey).' but terminal ssh connection works fine #1145
After upgrading the host of my 3 servers to Debian 12, I had the same issue. Works from the terminal, but not from SshNet
Removed the symlink and create an "original" clean authorized_keys with 600. No success.
All vms that are debian 11, ubuntu and arch, works fine, just the debian 12 which I get: Renci.SshNet.Common.SshAuthenticationException: 'Permission denied (publickey).'
The solution is to just add PubkeyAcceptedAlgorithms +ssh-rsa on the server config.
Seems like SshNet's default algo to send is becoming deprecated or at least by default unaccepted by new ssh servers.
Edit:
Further research shows that ssh-rsa is using SHA-1 which is not secure, thus the default rejection from ssh servers.
One ahs to change the sending algo to use SHA-256 and SHA-512 to be accepted without changing the server config to allow a less secure algo.
Activity
Zananok commentedon Jul 4, 2023
After upgrading the host of my 3 servers to Debian 12, I had the same issue. Works from the terminal, but not from SshNet
Removed the symlink and create an "original" clean authorized_keys with 600. No success.
All vms that are debian 11, ubuntu and arch, works fine, just the debian 12 which I get:
Renci.SshNet.Common.SshAuthenticationException: 'Permission denied (publickey).'The solution is to just add
PubkeyAcceptedAlgorithms +ssh-rsaon the server config.Seems like SshNet's default algo to send is becoming deprecated or at least by default unaccepted by new ssh servers.
Edit:
Further research shows that ssh-rsa is using SHA-1 which is not secure, thus the default rejection from ssh servers.
One ahs to change the sending algo to use SHA-256 and SHA-512 to be accepted without changing the server config to allow a less secure algo.
Edit2: #825
WojciechNagorski commentedon Oct 10, 2023
Version 2023.0.0 has been published https://www.nuget.org/packages/SSH.NET/2023.0.0