question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support OpenSSH 8.8

See original GitHub issue

OpenSSH 8.8 has disabled RSA signatures made with SHA1 by default. This seems to make SSH.net incompatible with it. When trying to connect with an application using SSH.Net, I get the following error:

Permission denied (publickey).

On the destination machine, the following is logged for the sshd daemon:

userauth_pubkey: key type ssh-rsa not in PubkeyAcceptedAlgorithms

In theory, regenerating keys with OpenSSH 8.8 should fix this problem, but in doing so, SSH.Net will no longer be able to read the new key, generating another error:

openssh key type: ssh-rsa is not supported

Sadly, I just have the stacktrace of the application I use for this, but maybe it helps:

Duplicati.Library.Interface.UserInformationException: Failed to parse the keyfile, check the key format and passphrase. Error message was openssh key type: ssh-rsa is not supported ---> Renci.SshNet.Common.SshException: openssh key type: ssh-rsa is not supported
Sep 29 20:31:18 htpc mono[1395173]:   at Renci.SshNet.PrivateKeyFile.ParseOpenSshV1Key (System.Byte[] keyFileData, System.String passPhrase) [0x000c3] in <8c66a76a693c4e52b456ec0712c863dd>:0
Sep 29 20:31:18 htpc mono[1395173]:   at Renci.SshNet.PrivateKeyFile.Open (System.IO.Stream privateKey, System.String passPhrase) [0x00355] in <8c66a76a693c4e52b456ec0712c863dd>:0
Sep 29 20:31:18 htpc mono[1395173]:   at Renci.SshNet.PrivateKeyFile..ctor (System.String fileName, System.String passPhrase) [0x00023] in <8c66a76a693c4e52b456ec0712c863dd>:0
Sep 29 20:31:18 htpc mono[1395173]:   at Renci.SshNet.PrivateKeyFile..ctor (System.String fileName) [0x00000] in <8c66a76a693c4e52b456ec0712c863dd>:0
Sep 29 20:31:18 htpc mono[1395173]:   at Duplicati.Library.Backend.SSHv2.ValidateKeyFile (System.String filename, System.String password) [0x0001f] in <64bc5fc0959e40abaaf59040a05bc63e>:0
Sep 29 20:31:18 htpc mono[1395173]:    --- End of inner exception stack trace ---
Sep 29 20:31:18 htpc mono[1395173]:   at Duplicati.Library.Backend.SSHv2.ValidateKeyFile (System.String filename, System.String password) [0x000ac] in <64bc5fc0959e40abaaf59040a05bc63e>:0
Sep 29 20:31:18 htpc mono[1395173]:   at Duplicati.Library.Backend.SSHv2.CreateConnection () [0x0006e] in <64bc5fc0959e40abaaf59040a05bc63e>:0
Sep 29 20:31:18 htpc mono[1395173]:   at Duplicati.Library.Backend.SSHv2+<List>d__42.MoveNext () [0x0002c] in <64bc5fc0959e40abaaf59040a05bc63e>:0
Sep 29 20:31:18 htpc mono[1395173]:   at Duplicati.Library.Interface.BackendExtensions.TestList (Duplicati.Library.Interface.IBackend backend) [0x00017] in <0b09fcfcca1b440fab7c860158765270>:0
Sep 29 20:31:18 htpc mono[1395173]:   at Duplicati.Library.Backend.SSHv2.Test () [0x00000] in <64bc5fc0959e40abaaf59040a05bc63e>:0
Sep 29 20:31:18 htpc mono[1395173]:   at Duplicati.Server.WebServer.RESTMethods.RemoteOperation.TestConnection (System.String url, Duplicati.Server.WebServer.RESTMethods.RequestInfo info) [0x000b7] in <3752ce5d8337471da6b77129cfa4bdbe>:0
Sep 29 20:31:18 htpc mono[1395173]:   at Duplicati.Server.WebServer.RESTMethods.RemoteOperation.POST (System.String key, Duplicati.Server.WebServer.RESTMethods.RequestInfo info) [0x00094] in <3752ce5d8337471da6b77129cfa4bdbe>:0
Sep 29 20:31:18 htpc mono[1395173]:   at Duplicati.Server.WebServer.RESTHandler.DoProcess (Duplicati.Server.WebServer.RESTMethods.RequestInfo info, System.String method, System.String module, System.String key) [0x00289] in <3752ce5d8337471da6b77129cfa4bdbe>:0

See https://www.openssh.com/txt/release-8.8 as well

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:10

github_iconTop GitHub Comments

11reactions
chrisdannacommented, Oct 5, 2021

Any chance of publishing the package with this update soon? Even if a prerelease?

6reactions
darinkescommented, Sep 30, 2021

Its already everything merged, just needs a new NuGet Release. See https://github.com/sshnet/SSH.NET/pull/614

Read more comments on GitHub >

github_iconTop Results From Across the Web

OpenSSH 8.8 release notes
OpenSSH is a 100% complete SSH protocol 2.0 implementation and includes sftp client and server support. Once again, we would like to thank ......
Read more >
OpenSSH: Release Notes
OpenSSH is a 100% complete SSH protocol 2.0 implementation and includes sftp client and server support. Once again, we would like to thank...
Read more >
OpenSSH 8.8 arrives saying goodbye to ssh-rsa support, ...
OpenSSH 8.8 arrives saying goodbye to ssh-rsa support, bug fixes and more ; The new version of OpenSSH 8.8 has already been released...
Read more >
OpenSSH 8.8 client incompatibility and workaround
Update (2021-10-21) Bitbucket Cloud now supports rsa-sha2-256 and rsa-sha2-512 ... The OpenSSH 8.8 client will function without the need for.
Read more >
OpenSSH-8.8p1
The OpenSSH package contains ssh clients and the sshd daemon. This is useful for encrypting authentication and subsequent traffic over a network. The...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found