Server unexpectedly closed network connection 문제

Jmnote (토론 | 기여)님의 2012년 1월 8일 (일) 11:11 판

서버가 네트워크 접속을 예기치 않게 종료하였습니다... 뭔말인지...

1 현상

PuTTY에서 "Server unexpectedly closed network connection"가 메시지 창이 나오면서 SSH 접속이 안된다. (PuTTY Fatal Error 중 하나) 또 브라우저에서 URL로 웹사이트를 접속해보았는데 되지 않는다.

2 22 포트 점검

C:\Users\Administrator>tcping 123.234.123.234 22

Probing 123.234.123.234:22/tcp - Port is open - time=14.523ms
Probing 123.234.123.234:22/tcp - Port is open - time=12.998ms
Probing 123.234.123.234:22/tcp - Port is open - time=12.893ms
Probing 123.234.123.234:22/tcp - Port is open - time=13.362ms

Ping statistics for 118.219.233.153:22
     4 probes sent.
     4 successful, 0 failed.
Approximate trip times in milli-seconds:
     Minimum = 12.893ms, Maximum = 14.523ms, Average = 13.444ms

C:\Users\Administrator>
  • 22 포트는 열려 있다.

3 해결

  • sshd를 kill하고 다시 구동하면 된다고 한다.[1]
  • ssh 외에, VNC Viewer처럼 직접 접속할 수 있는 수단이 없는 상황.
  • VM을 강제종료 후 시작했더니 정상화되었다.

4 원인(추정)

  • fail2ban과 관련있는 듯 함.
  • 어제 iptables -L 했을 때 fail2ban에 아이피 몇 개가 등록되어 있었음.

5 조치

  • 복잡한 패스워드로 변경
  • iptables에서 일부 IP만 22포트 접속 허용.
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}