Read from socket failed: Connection reset by peer

  • sshでアクセスしようとすると以下のエラーが出るようになってしまった。
$ ssh user@hostname
Read from socket failed: Connection reset by peer
  • /etc/hosts.allowなどを見るという情報などもあったが、自分は/etc/sshディレクトリ以下のファイルパーミッションを意図せず変更していたのが原因でした。
  • スクリプトを作成していて意図せず、"$ sudo chmod -R +rx /"なんてコマンドを実行していた。