sshでWrite failed: Broken pipe
投稿者:yasu 更新日時:2011年4月27日 22時25分02秒カテゴリ:Linux, Ubuntu
会社のUbuntuから自宅サーバーにsshが繋がらなくなりました。
sshコマンドを実行すると「Write failed: Broken pipe」と表示されてログインできないのです。
原因は多分ですがtermtter(MacやLinuxのターミナル上でTwitterができる)を使いたくてruby関連のパッケージを導入したからじゃないかと思われるのですが、原因は定かではありません。
sshコマンド実行時に-vvを付けて詳細な状況を表示したところ下記のような表示がありました。
debug1: Authentications that can continue: publickey,gssapi-with-mic
debug1: Next authentication method: gssapi-with-mic
debug1: Unspecified GSS failure. Minor code may provide more information
Credentials cache file '/tmp/krb5cc_1000' not founddebug1: Unspecified GSS failure. Minor code may provide more information
Credentials cache file '/tmp/krb5cc_1000' not founddebug1: Unspecified GSS failure. Minor code may provide more information
debug2: we did not send a packet, disable method
debug1: Next authentication method: publickey
debug1: Trying private key: /home/ubuntu/id_rsa
debug1: PEM_read_PrivateKey failed
debug1: read PEM private key done: type <unknown>
Enter passphrase for key '/xxxx/xxxxxx/xxxxxx':
debug1: read PEM private key done: type RSA
debug2: we sent a publickey packet, wait for reply
Write failed: Broken pipe
よくわからないのでインターネットで調べてみました。
ssh: 接続に時間がかかる現象を解決 - tkrdの日記 (rails や ubuntu のことなど)
こちらの方は認証に時間がかかっているという悩みのようなのですが、メッセージは同じなので同じように .ssh/config にGSSAPIAuthentication noを追加して再度ssh接続を実行したところ無事接続できるようになりました。

