Ssh 트러블슈팅

한국 데비안 사용자 모임
Westporch (토론 | 기여)님의 2017년 8월 29일 (화) 22:40 판 (새 문서: 작성일자: 2015년 11월 26일 작성자: westporch == timed out waiting for input: auto-logout 문제 해결하기 == === TMOUT 쉘 변수 확인 === TMOUT 쉘 변수에 자...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)
둘러보기로 가기 검색하러 가기
작성일자: 2015년 11월 26일
작성자: westporch

timed out waiting for input: auto-logout 문제 해결하기

TMOUT 쉘 변수 확인

TMOUT 쉘 변수에 자동 로그아웃 시간이 설정되어 있습니다. 프롬프트에 echo $TMOUT 명령으로 언제 로그아웃이 되는지 확인합니다.

[root@localhost ssh]# echo $TMOUT
300
[root@localhost ssh]# 

300은 5분(300 초)을 의미합니다.

TMOUT 비활성화

~/.bash_profile에 TMOUT=을 기록한 뒤 source ~/.bashrc 명령을 입력합니다. echo $TMOUT 명령으로 _$TMOUT_의 값을 확인하면 값이 지정되지 않았습니다. 이제 자동으로 로그아웃되지 않고 접속을 유지할 수 있습니다.

[root@SNIPER ssh]# echo $TMOUT

[root@SNIPER ssh]# 

WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! 해결 방법

ssh 접속시 WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!가 발생할 때가 있습니다.

root@localhost:/home/westporch# ssh 10.0.11.244
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
ae:1a:ff:f7:a3:be:4c:70:dd:07:e3:48:a4:7f:c2:3c.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /root/.ssh/known_hosts:3
  remove with: ssh-keygen -f "/root/.ssh/known_hosts" -R 10.0.11.244
RSA host key for 10.0.11.244 has changed and you have requested strict checking.
Host key verification failed.
root@localhost:/home/westporch#

해결 방법

ssh-keygen -R '접속할 주소' 를 입력합니다.

root@localhost:/home/westporch# ssh-keygen -R 10.0.11.244
# Host 10.0.11.244 found: line 3 type ECDSA
/root/.ssh/known_hosts updated.
Original contents retained as /root/.ssh/known_hosts.old
root@localhost:/home/westporch#

ssh '접속할 주소' 를 입력해서 다시 ssh 접속을 시도합니다. 이때 yes를 입력합니다. 아래 화면과 같이 다시 접속이 가능해졌습니다.

root@localhost:/home/westporch# ssh 10.0.11.244
The authenticity of host '10.0.11.244 (10.0.11.244)' can't be established.
RSA key fingerprint is ae:1a:ff:f7:a3:be:4c:70:dd:07:e3:48:a4:7f:c2:3c.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.0.11.244' (RSA) to the list of known hosts.
root@10.0.11.244's password: 
Last login: Wed Nov 25 15:22:42 2015 from 10.0.11.185
[root@Hello ~]#