ssh_exchange_identification: Connection closed by remote host と言われたときにクライアント側でできる対処
家のネット回線を変えてからsshしたときに
$ ssh hoge
ssh_exchange_identification: Connection closed by remote host
と言われました。
このようなとき、クライアント側で~/.ssh/known_hosts
を削除すると、再び接続できるようになりました。
$ rm ~/.ssh/known_hosts
$ ssh hoge
The authenticity of host 'x.x.x.x (y.y.y.y)' can't be established.
RSA key fingerprint is xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'x.x.x.x' (RSA) to the list of known hosts.
<<正常にログインできる>>
おそらく、known_hostsに前の接続情報が残っていてコンフリクトを起こしたのでしょう。
なお、他の原因として、サーバ側で/etc/hosts.allow
をいじったことなどもありますが、この辺はググってみてください。
Author And Source
この問題について(ssh_exchange_identification: Connection closed by remote host と言われたときにクライアント側でできる対処), 我々は、より多くの情報をここで見つけました https://qiita.com/sky_y/items/84a73578f94693f6a8dd著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .