i am using ubuntu 16.04. The Server is also running ubuntu 16.04.

my /etc/ssh/ssh_config looks so:

Host *
#   ForwardAgent no
    ForwardX11 yes
    ForwardX11Trusted yes
#   RhostsRSAAuthentication no
#   RSAAuthentication yes
#   PasswordAuthentication yes
#   HostbasedAuthentication no
#   GSSAPIAuthentication no
#   GSSAPIDelegateCredentials no
#   GSSAPIKeyExchange no
#   GSSAPITrustDNS no
#   BatchMode no
#   CheckHostIP yes
#   AddressFamily any
#   ConnectTimeout 0
#   StrictHostKeyChecking ask
#   IdentityFile ~/.ssh/identity
#   IdentityFile ~/.ssh/id_rsa
#   IdentityFile ~/.ssh/id_dsa
#   IdentityFile ~/.ssh/id_ecdsa
#   IdentityFile ~/.ssh/id_ed25519
#   Port 22
#   Protocol 2
#   Cipher 3des
#   Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
#   MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
#   EscapeChar ~
#   Tunnel no
#   TunnelDevice any:any
#   PermitLocalCommand no
#   VisualHostKey no
#   ProxyCommand ssh -q -W %h:%p gateway.example.com
#   RekeyLimit 1G 1h
    SendEnv LANG LC_*
    HashKnownHosts yes
    GSSAPIAuthentication yes
    GSSAPIDelegateCredentials no

server sshd_config:

X11Forwarding yes
X11DisplayOffset 10

When i connect to a ssh Server :

ssh -vvv -Y server

ssh connects to the server. When i running something like xclock this happens:

debug3: receive packet: type 90
debug1: client_input_channel_open: ctype x11 rchan 2 win 65536 max 16384
debug1: client_request_x11: request from 59790
debug2: fd 7 setting O_NONBLOCK
debug3: fd 7 is O_NONBLOCK
debug1: channel 1: new [x11]
debug1: confirm x11
debug3: send packet: type 91

The terminal also dies after this i have to restart a new terminal. No clock is showing up on local pc also there is no error... Any idea? When i try the same from Win 10 with xming and putty it works. Server has activated x11 forwarding.


You need to add ForwardX11 yes to ssh-users ~/.ssh/config file

/etc/ssh/sshd_config needs the setting X11Forwarding yes

  • i wrote above that both are activated... Posted my ssh_config file also – Dominik Kaeufer Dec 13 '18 at 10:18
  • ForwardX11 is not X11Forwarding, right? – Michael D. Dec 13 '18 at 10:54
  • On the server x11 Forwarding is activated i wrote this below...I can access via win 10 with xming and putty so it must be activated or am i wrong? – Dominik Kaeufer Dec 13 '18 at 11:42
  • i copied the x11Forwarding from sshd_config into the post so that u can see it is activated – Dominik Kaeufer Dec 13 '18 at 11:48
  • On client side you need to run ssh -X or enable via ~/.ssh/config see unix.stackexchange.com/questions/12755/… – Michael D. Dec 13 '18 at 15:35

One detail of configuration that I have stumbled over in the past, and could possibly be causing your trouble, is clarified by one sentence in man sshd_config. Also, man ssh_config says something similar.

For each keyword, the first obtained value will be used.

This seems counterintuitive to me, but if you have the same line with different values in ssh_config and/or ~/.ssh/config on the machine your using, it's the first one that will take effect. Later ones will be ignored.

Same for sshd_config on the distant machine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.