1

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

Command:

xclock

Result:

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 127.0.0.1:60167
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!!?!

Command:

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

Result:

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

Ubuntu2

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

Ubuntu3

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

echo $DISPLAY

Ubuntu2

localhost:10.0

Ubuntu3

ubuntu3:10.0

which xauth

Ubuntu2

/usr/bin/xauth

Ubuntu3

/usr/bin/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?

5
  • What you need to look at (and post) are the server's logs.
    – qasdfdsaq
    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
    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
    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
    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
    Sep 19, 2016 at 20:27

3 Answers 3

1

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

0

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 192.168.245.4
    
  6. Test it

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

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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