2

I have a VPS server running Ubuntu 20.04 and OpenSSH 8.2p1, and a Raspberry Pi 3 running Debian Buster and OpenSSH 7.9p1.

I can ssh into the VPS fine from my desktop, but when I try from my Pi, I get a Kex error.

Sep 12 18:41:30 myhost sshd[3197]: Unable to negotiate with xxx.xxx.xxx.xxx port 64952: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1 [preauth]

I hunted around and found several answers to this already, however none of the methods worked for me, and regardless seem to indicate that the problem is that the server does not support modern Kex algorithms, which I didn't think would be the case here.

Here's the output of ssh -Q kex on both the VPS and the Pi:

 VPS                                    | Pi
----------------------------------------|----------------------------
diffie-hellman-group1-sha1              | diffie-hellman-group1-sha1
diffie-hellman-group14-sha1             | diffie-hellman-group14-sha1
diffie-hellman-group14-sha256           | diffie-hellman-group14-sha256
diffie-hellman-group16-sha512           | diffie-hellman-group16-sha512
diffie-hellman-group18-sha512           | diffie-hellman-group18-sha512
diffie-hellman-group-exchange-sha1      | diffie-hellman-group-exchange-sha1
diffie-hellman-group-exchange-sha256    | diffie-hellman-group-exchange-sha256
ecdh-sha2-nistp256                      | ecdh-sha2-nistp256
ecdh-sha2-nistp384                      | ecdh-sha2-nistp384
ecdh-sha2-nistp521                      | ecdh-sha2-nistp512
curve25519-sha256                       | curve25519-sha256
curve25519-sha256@libssh.org            | curve25519-sha256@libssh.org
sntrup4591761x25519-sha512@tinyssh.org  |

And here's the contents of my .ssh/config file on the Pi:

IdentitiesOnly yes

Host myhost HostName xxx.xxx.xxx.xxx User myuser Port 22 IdentityFile ~/.ssh/id_ed25519_myhost

Any help debugging this would be greatly appreciated.

Thanks in advance!

1 Answers1

0

Well, I'm put myself on a wild goose chase for no reason - the problem here was that I miss-typed my VPS server's IP address by one character in the .ssh/config file.

Ouch.