X11 전달이 잠시 후에 작동을 멈춤 멈 춥니

Cygwin을 사용하여 SSH를 통해 Linux 상자 (우분투 서버 12.04)를 연결하고 X11 전달을 사용합니다. 내가 ssh 할 때마다 X 포워딩을 잠시 동안 사용할 수 있으며 작동을 멈 춥니 다 (예 : gvim은 디스플레이를 열 수 없다고 말합니다). 종료하고 다시 ssh하면 다시 작동하기 시작합니다. 그리고 잠시 후에 다시 멈 춥니 다.

어떤 아이디어?



답변

이 문제가 발생했을 때 다음 줄을 추가해야한다는 것을 알았습니다 ~/.ssh/config.

Host *
    ForwardX11Trusted yes

모든 ssh 연결에 대해 사용 가능하지 않도록 *를 일종의 호스트 패턴으로 수정해야합니다.

대신 ForwardX11Timeout 옵션을 변경할 수 있습니다. 보낸 사람 man ssh_config:

 ForwardX11Timeout
    Specify a timeout for untrusted X11 forwarding using the format
    described in the TIME FORMATS section of sshd_config(5).  X11
    connections received by ssh(1) after this time will be refused.  The
    default is to disable untrusted X11 forwarding after twenty minutes has
    elapsed.

 ForwardX11Trusted
    If this option is set to “yes”, remote X11 clients will have full
    access to the original X11 display.

    If this option is set to “no”, remote X11 clients will be considered
    untrusted and prevented from stealing or tampering with data belonging
    to trusted X11 clients.  Furthermore, the xauth(1) token used for the
    session will be set to expire after 20 minutes.  Remote clients will
    be refused access after this time.