ssh 실행 시 X11 forwarding request failed on channel 0 에러 처리하기
ssh -X userid@host로 접속해서, 콘솔창에 아래와 같은 메시지가 보인다면 X-window를 이용할 수 없다.
X11 forwarding request failed on channel 0
verbose 기능인 -v를 옵션을 추가해서 즉, ssh -v -X userid@host 를 실행한다면, 에러메시지를 자세하게 볼수 있다.
이때,
Remote: Can't get IP address for X11 DISPLAY
와 같은 메시지가 보인다면, 아래의 파일을 수정한 후, $ sudo service sshd restart 한다.
/etc/ssh/sshd_config
#AllowAgentForwarding yes
AllowTcpForwarding yes
#GatewayPorts no
X11Forwarding yes
X11DisplayOffset 10
#X11UseLocalhost no
#PermitTTY yes
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
#UseLogin no
UsePrivilegeSeparation sandbox # Default for new installations.
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#ShowPatchLevel no
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none