I have a Ubuntu 14 running as the "Server" and am trying to use PuTTY on my windows machine as the "Client"

On the Server: ForwardX11 yes ForwardX11Trusted yes

On the Client: PuTTY Configuration: SSH->X11->Enable X11 Forwarding (ticked), with MIT-Magic-Cookie-1 Xming Server running

PuTTY Event Log:

2016-09-18 01:02:24 Requesting X11 forwarding
2016-09-18 01:02:24 X11 forwarding enabled




PuTTY X11 proxy: Unsupported authorisation protocol
Error: Can't open display: ubuntu3:10.0

The above command records this in the PuTTY Event Log:

2016-09-18 01:20:22 Received X11 connect request from
2016-09-18 01:20:22 Opened X11 forward channel
2016-09-18 01:20:22 Forwarded X11 connection terminated

I've tried uninstalling xauth using apt-get purge xauth then reinstalling apt-get install xauth

Can anyone think of why this is not working? It was working a little while back... am not sure what changed!!?!


sudo DISPLAY=localhost:11 XAUTHORITY=/home/<username>/.Xauthority xclock


PuTTY X11 proxy: Unsupported authorisation protocol
Error: Can't open display: localhost:11

When I try the same from a another Linux box, I get this error instead of Unsupported authorisation protocol:

X11 connection rejected because of wrong authentication.
Error: Can't open display: ubuntu3:10.0

I have 2 Ubuntu systems. Named Ubuntu2 and Ubuntu3. Everything seems to work on Ubuntu2. So I started comparing the two...

xauth list


ubuntu/unix:10  MIT-MAGIC-COOKIE-1  7c27c83c47f4b323a2855c67e1eeef63
ubuntu/unix:11  MIT-MAGIC-COOKIE-1  7c1aa456987ee9face9a35f8aa72acf3
ubuntu2/unix:0  MIT-MAGIC-COOKIE-1  50073df1fac06436a5e724d93730ef64
ubuntu2/unix:11  MIT-MAGIC-COOKIE-1  5860938ccf8af0e0f4a00c37ca51feb5
ubuntu2/unix:10  MIT-MAGIC-COOKIE-1  0fa58759ec8e78b735aa3528933464c0


localhost:11  MIT-MAGIC-COOKIE-1  b6e1bf9dedae8b358133462e3d702547
ip6-localhost:11  MIT-MAGIC-COOKIE-1  b6e1bf9dedae8b358133462e3d702547
localhost:13  MIT-MAGIC-COOKIE-1  6fe13bad7d70320cf01c1d9ea76ab084
ip6-localhost:13  MIT-MAGIC-COOKIE-1  6fe13bad7d70320cf01c1d9ea76ab084
ubuntu3/unix:0  MIT-MAGIC-COOKIE-1  c4bf89ae06d1aca5f36993fe728a5d21






which xauth





Something Strange

I started comparing different conf files between the two systems. And noticed ip6 was disabled on Ubuntu3 and not on Ubuntu2. So, I tried re-enabling ip6 on Ubuntu3 and no dice. So, I disabled it on Ubuntu2 and it broke X11 forwarding. I don't know why and how ip6 plays a role in this... can someone explain?

  • What you need to look at (and post) are the server's logs.
    – qasdfdsaq
    Commented Sep 18, 2016 at 14:40
  • Checked auth.log and nothing gets added when i run xclock. Is there another log I should be checking?
    – sam yi
    Commented Sep 18, 2016 at 14:58
  • All of them. System log, SSHD log, X11 log, dmesg, secure, if you have them, depending on your distro.
    – qasdfdsaq
    Commented Sep 18, 2016 at 15:05
  • I have 2 ubuntu boxes. Ubuntu2 and Ubuntu3. It works on Ubuntu2 but not on Ubuntu3. When I do echo $DISPLAY, I get localhost:10.0 and ubuntu3:11.0 respectively. Do you think that has something to do with it? I export DISPLAY=localhost:10.0 on ubuntu3 and it does not seem to help? Any thoughts?
    – sam yi
    Commented Sep 18, 2016 at 20:56
  • After struggling with it for last 3 days! Found the answer here!!! serverfault.com/questions/278743/ssh-x11-not-working
    – sam yi
    Commented Sep 19, 2016 at 20:27

3 Answers 3


Almost there Oracle Linux 7.x I had to go into vi /etc/ssh/sshd_config

Find the lines for X11 and make sure they were active or set

X11Forwarding yes

X11DisplayOffset 10

X11UseLocalhost yes

re-ran putty as oracle and ran the runInstaller... and it worked


I had a similar error using PuTTY (from Windows 10) whenever accessing Ubuntu 14.04.2 LTS. (Xming Server is running in Windows)

    PuTTY X11 proxy: Authorisation not recognised
    Error: Can't open display: sdnhubvm:10.0

I solved my problem by modifying the file sshd_config inside /etc/ssh/.

Steps I took:

  1. Open file sshd_config using an editor such as vim.

    sudo vi /etc/ssh/sshd_config
  2. Locate the line that says X11UseLocalHost no (was around lines #65-67)

    65 X11DisplayOffset 10
    66 X11UseLocalHost no
    67 PrintMotd no
  3. Comment out line #X11UseLocalHost no and save.

    65 X11DisplayOffset 10
    66 # X11UseLocalHost no
    67 PrintMotd no
  4. Reboot
  5. Start PuTTY

    putty.exe -X
  6. Test it

    ubuntu@sdnhubvm:~$ xclock
  7. It now works. Done.


I had a similar problem except that when starting putty connection there was an error message on the server saying : /usr/bin/xauth: timeout in locking authority file /home/retud/.Xauthority"

This was because the user didn't have the good right on the server (1003 instead of retud in this case). 2 drwxr-xr-x 7 1003 retud 14 Nov 25 2020 . My solution to solve the problem was to change the owner of the directory retud@LP0X:~$ sudo su - root@LP0X:/home# root@LP0X:/home# chown -R retud /retud

It solves the problem. My two cents.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .