raspberri piからubuntuサーバーにsshしようとするとKexエラーが発生します。

raspberri piからubuntuサーバーにsshしようとするとKexエラーが発生します。

Ubuntu 20.04とOpenSSH 8.2p1を実行しているVPSサーバーと、Debian BusterとOpenSSH 7.9p1を実行しているRaspberry Pi 3があります。

通常、デスクトップからVPSにSSHで接続できますが、Piで試してみるとKexエラーが発生します.

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]

あちこち見回りが見つかりました。一部 回答これにはすでに方法がありますが、どちらも私には効果的ではなく、サーバーが最新のKexアルゴリズムをサポートしていないことが問題のようです。ここではそうではないと思います。

ssh -Q kexVPSと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
[email protected]            | [email protected]
[email protected]  |

.ssh/configこれはPiの私のファイルの内容です。

IdentitiesOnly yes

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

デバッグにご協力いただきありがとうございます。

よろしくお願いします!

ベストアンサー1

まあ、私は理由なしでガチョウの追跡に閉じ込められました。ここで問題は、ファイルに私のVPSサーバーのIPアドレスに誤って文字を入力したことです.ssh/config

あや。

おすすめ記事