SSHが壊れており、メッセージ認証コードが正しくありません。

SSHが壊れており、メッセージ認証コードが正しくありません。

MacBook Airのバックアップに使用するUbuntuサーバーを設定しましたrsync。しかしrsync、 even を使用するたびに、次のscpエラーのいずれかで接続が失われます。

packet_write_wait: Connection to 192.168.1.202: Broken pipe
packet_write_poll: Connection to 192.168.1.202: Broken pipe
packet_write_poll: Connection to 192.168.1.202: Protocol wrong type for socket

今、私は他の同様の問題を検索しましたが、一般的に人々はセッションタイムアウトのために長いバックアップに問題があります。私にとって、これは常にファイル転送を開始してから10秒以内に発生します。 scpとrsyncを使用して同じエラーが発生しました。ネットワーク接続エラーが原因である可能性がありますが、同じLAN上のサーバーへの接続がこのように不安定であることは信じられません。誰にもアイデアがありますか?

私が使用したコマンドでエラーが発生した例は次のとおりです。

scp -r /Users/Matt/Documents [email protected]:/media/matt/MattsBackups/

/usr/local/bin/rsync -av -e ssh /Users/Matt/Documents [email protected]:/media/matt/MattsBackups/

今日はもう少しテストしましたが、奇妙なことに、LANの外でもかなり安定して動作しました。だからホームネットワークで再試行しましたが、まだ動作していません。

走る

grep 'sshd' /var/log/auth.log

サーバーに次のエラーが表示されます

fatal: ssh_dispatch_run_fatal: Connection from <My IP> port 49870: message authentication code incorrect

私の設定に関する詳細情報は次のとおりです。

Macbook Air OS X 10.11.5
OpenSSH_6.9p1, LibreSSL 2.1.8
rsync  version 3.1.2  protocol version 31

Ubuntu Server
OpenSSH_7.2p2 Ubuntu-4ubuntu1, OpenSSL 1.0.2g-fips  1 Mar 2016

SSHバージョンで違いを見つけましたが、問題にならないことを願っています。 homebrewを使用して最新バージョンをインストールしてみることができます。

修正する:

さて、ちょうどhomebrewを使ってsshを更新しました。

OpenSSH_7.2p2, OpenSSL 1.0.2g  1 Mar 2016

これはUbuntuボックスで使用されているのと同じバージョンのようです。ただし、Rsync はコマンドを実行するとエラーが発生します。以下は、ssh -vフラグを使用して試みたコマンドです。

/usr/local/bin/rsync -a -e '/usr/local/bin/ssh -v -c aes128-ctr -m hmac-sha1' /Users/Matt/Documents [email protected]:/media/matt/MattsBackups/

出力は次のとおりです

OpenSSH_7.2p2, OpenSSL 1.0.2g  1 Mar 2016
debug1: Reading configuration data /usr/local/etc/ssh/ssh_config
debug1: Connecting to 192.168.1.202 [192.168.1.202] port 22.
debug1: Connection established.
debug1: identity file /Users/Matt/.ssh/id_rsa type 1 
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Matt/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Matt/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Matt/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Matt/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Matt/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Matt/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Matt/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.2p2 Ubuntu-4ubuntu1
debug1: match: OpenSSH_7.2p2 Ubuntu-4ubuntu1 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 192.168.1.202:22 as 'matt'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: [email protected]
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha1 compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha1 compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:+zkrXNJENs5EobFwHa8wpMDe6zPDfj975qLcPp4b4sg
debug1: Host '192.168.1.202' is known and matches the ECDSA host key.
debug1: Found key in /Users/Matt/.ssh/known_hosts:1
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/Matt/.ssh/id_rsa
debug1: Server accepts key: pkalg rsa-sha2-512 blen 279
debug1: Authentication succeeded (publickey).
Authenticated to 192.168.1.202 ([192.168.1.202]:22).
debug1: channel 0: new [client-session]
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: pledge: network
debug1: client_input_global_request: rtype [email protected] want_reply 0
debug1: Sending command: rsync --server -logDtpre.iLsfxC . /media/matt/MattsBackups/MacAir/
debug1: channel 0: free: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
debug1: fd 1 clearing O_NONBLOCK
Connection to 192.168.1.202 closed by remote host.
Transferred: sent 145304, received 13032 bytes, in 0.1 seconds
Bytes per second: sent 1373019.8, received 123143.2
debug1: Exit status -1
rsync: [sender] write error: Broken pipe (32)
rsync error: error in socket IO (code 10) at io.c(820) [sender=3.1.2]

ベストアンサー1

最後の手段として、Windows 98 PCで古い10/100イーサネットカードを見つけてサーバーにインストールしました。設定後、エラーは発生せず、約30GBを超えるデータを保持しました。内蔵のイーサネットチップセットがUbuntuでは正常に動作しないようです。それとも、私は何とか間違って設定しました。

編集:問題の根本的な原因が見つかりませんでしたが、@sourcejediの答えの下にあるコメントスレッドを確認してください。 @sourcejedi、@sneep、@dentargに感謝します。

おすすめ記事