SSH接続は「debug1:SSH2_MSG_KEXINIT sent」で停止します。

SSH接続は「debug1:SSH2_MSG_KEXINIT sent」で停止します。

SSHポート番号を22から2222に変更しました。以前に設定した接続はデフォルトのSSHポート22です。問題ありません。 NAT がルーターに正しくマップされています。

デバッグしようとすると

ssh -v -p2222 www.example.com

このエラーが発生します。

debug1: SSH2_MSG_KEXINIT

以下はすべてのデバッグログです。

bob@server:~$ ssh -v -p2222 www.example.com
OpenSSH_4.7p1 Debian-8ubuntu1.2, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to www.example.com [100.100.100.100] port 2222.
debug1: Connection established.
debug1: identity file /home/bob/.ssh/identity type -1
debug1: identity file /home/bob/.ssh/id_rsa type -1
debug1: identity file /home/bob/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.7p1 Debian-8ubuntu1.2
debug1: match: OpenSSH_4.7p1 Debian-8ubuntu1.2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.7p1 Debian-8ubuntu1.2
debug1: SSH2_MSG_KEXINIT sent
Connection closed by 100.100.100.100

接続が閉じられたように、ネットワークの内部と外部の複数のコンピュータでgnome-terminal、putty、securecrtを使用しましたが、まだ同じエラーが発生します。

ベストアンサー1

XENホストでこれが起こりました。私はこのホストを別のホストからコピーし、通常どおり新しいホストキーが後で作成されると思った後、/ etc / sshからホストキーを削除しました。しかし、これは決して起こらず、sshdはホストキーなしで幸せになりました。このホストで SSH を試みると、SSH2_MSG_KEXINIT の後に終了します。私がしなければならなかったのは、ホストキーを作成することだけでした。 Debian ベースのコンピュータでは、次のように行われました。

dpkg-reconfigure openssh-server

おすすめ記事