web-dev-qa-db-ja.com

{ssh hostname}ポート22による接続のリセット

コマンドssh [email protected]を使用してRaspberry Piをセットアップしようとしていますが、これらのメッセージが引き続き表示されます。

ssh -v [email protected] 
OpenSSH_7.4p1, LibreSSL 2.5.0
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 53: Applying options for *
debug1: Connecting to raspberrypi.local [2601:47:4001:d250:88ff:ddb5:f761:74d2] port 22.
debug1: Connection established.
debug1: identity file /Users/liz/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/liz/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/liz/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/liz/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/liz/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/liz/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/liz/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/liz/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.4
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4p1 Raspbian-10+deb9u1
debug1: match: OpenSSH_7.4p1 Raspbian-10+deb9u1 pat OpenSSH* compat 0x04000000
debug1: Authenticating to raspberrypi.local:22 as 'pi'
debug1: SSH2_MSG_KEXINIT sent
Connection reset by 2601:47:4001:d250:88ff:ddb5:f761:74d2 port 22

以前にまったく同じホスト名とユーザー名で別のRaspberry Piにsshしたという事実と関係があるという予感がありますが、この1つにアクセスできるように修正する方法がわかりません(おそらく今後この問題を回避するために名前を変更します)。 ssh-keygen -R raspberrypi.localを実行しようとしましたが、まだ同じメッセージが表示されます。それを削除するためにもっとする必要がありますか? Sierra 10.12.6で実行されているMacも使用しています。同様の問題を調べてみましたが、機能するものが見つかりませんでした。ありがとう!

9
liz

私もこの問題を抱えていました。

私のために働いたソリューションは次のとおりです: https://raspberrypi.stackexchange.com/a/60375/2692

本質的に:

rm /etc/ssh/ssh_Host_*
dpkg-reconfigure openssh-server

問題は、最初のブートで生成されたキーペアファイルが破損していることだと思います(おそらく、セットアッププロセス中に電源を抜き差しすることによる)。

15
CoolAJ86

私はdpkgをhomebrew経由でインストールし、SSDカードを再フラッシュして、それが機能するようになりました。他の誰かが同様の問題に遭遇した場合に、なぜそれが非常に細かくても有用な情報であったのかは本当にわかりません。

0
liz