TurboVNC / turbovnc

Main TurboVNC repository
https://TurboVNC.org
GNU General Public License v2.0
747 stars 137 forks source link

Viewer: Ed25519 SSH keys no longer work with the built-in SSH client in TurboVNC 3.0.1 and later #360

Closed dcommander closed 1 year ago

dcommander commented 1 year ago

Reported by @samh in https://github.com/TurboVNC/turbovnc/issues/323#issuecomment-1428760663

To be clear, the TurboVNC Viewer's built-in SSH client never actually supported the Ed25519 algorithm and still doesn't. (Supporting that algorithm properly will require adopting more code from https://github.com/mwiede/jsch, per #323. I will look into that for TurboVNC 3.1, if there is time.) However, Ed25519 private keys accidentally worked with TurboVNC 3.0 as long as they were served up by ssh-agent. They ceased working with d6ae34d6f4bd29308acc9835c8eb80f5e4b2143c in TurboVNC 3.0.1, specifically because of this change that implements the PubkeyAcceptedAlgorithms OpenSSH config file keyword and limits the accepted algorithms to those specified in that keyword (the default value of which is specified in java/com/jcraft/jsch/JSch.java.)

The workaround is to add PubkeyAcceptedAlgorithms +ssh-ed25519 to the top of ~/.ssh/config or to a host entry in ~/.ssh/config, such as:

Host my_host_name
    HostName my_host_name_or_IP_address
    PubkeyAcceptedAlgorithms +ssh-ed25519
samh commented 1 year ago

Thank you for the explanation; I didn't realize it was because of my use of the ssh-agent, so my mental model was a bit off.

I always use an ssh-agent, so this option works well for me, and even better since you added support for +/^/- as mentioned in #357.