telnet 사용시 Ctrl-] 를 누르면 프롬프트로 나오며 여기에서 여러 가지 명령어를 입력할 수 있습니다.

ssh 는 기본 escape character 는 ~ 이며 이를 활용하여 여러 가지 명령어를 내릴 수 있습니다.


Supported escape sequences:
  ~.  - terminate session
  ~B  - send a BREAK to the remote system
  ~R  - Request rekey (SSH protocol 2 only)
  ~#  - list forwarded connections
  ~?  - this message
  ~~  - send the escape character by typing it twice
(Note that escapes are only recognized immediately after newline.)
CODE

예로 ssh 로 원격지 연결시 timeout 등으로 세션이 끊어졌는데 프롬프트로 돌아오지 않을 경우 세션 종료 escape sequence 인 다음 키를 순서대로 누르면 세션이 강제 종료됩니다.

  • Enter ~  . (엔터, 틸드, 쩜)


Ref