Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to connect to an Ubuntu server to work on Qt-creator. Before everything goes wrong, I followed this tutorial. I downloaded putty and Xming and everything was working just fine.

then, suddenly, while working on Qt-creator I couldn't save any changes. So, I closed Qt-creator and restart the putty session. it asked me about username and password (as usual) then after log-in into the server and when I tried to run Qt-creator (as usual) the following message appears:

PuTTY X11 proxy: wrong authorisation protocol attempted
Can't open display: localhost:10.0

so, I tried to resolve the problem using two approaches found in the internet:

the first one is by getting the dpyname protoname hexkey using:

xauth list 

which should return the key which is then could be added using:

xauth add

However, it didn't work as the xauth list command returned nothing.

the second solution was to go to:


open the file: sshd_config and edit the ForwardX11Trusted line to read yes, and If no such line exists, add it in.

ForwardX11Trusted yes

then restart the ssh server and it should work.

However, it didn't work either. I could not open the file sshd_config using xdg-open or gedit and the same message appears again.

so why is this happening and what is the solution for it ?

share|improve this question
The good news is: I am now able to open the file: sshd_config using sudo nano command and add the line: ForwardX11Trusted yes.. the bad news is: after the "adding step" the problem still exists !!! – Suda.nese Jun 20 '13 at 16:07
What is the full command when you use xauth add? – Nate from Kalamazoo Jun 20 '13 at 22:35


I got it solved using a mixture of the two mentioned above.

1. I added the following line to '/etc/ssh/sshd_config'

ForwardX11Trusted yes

2. I installed xauth using

sudo apt-get install xauth

xauth list was empty for me before restart. It was, however, populated after the restart. I did xauth list after I tested it with putty.

Then I restarted ssh and it worked. Yay!

Note: What I actually did was restart my Raspberry Pi

share|improve this answer
ForwardX11Trusted is not a valid option for sshd_config. It is a client parameter, not a server daemon parameter – HeatfanJohn Jan 21 at 16:17
I'd done this quite some time ago. Don't know now. – Dheeraj Bhaskar Jan 26 at 10:40

While logged in as su, after a few "PuTTY X11 proxy: wrong authorisation protocol attempted" -type errors, I realized it was an authentication problem. Then I remembered to copy the .Xauthority file from my own profile /home directory to /root. Problem solved!

share|improve this answer
This looks like answer to a different problem (although with the same symptoms). – DavidPostill Dec 13 '15 at 20:30

In my case, I noticed I could open the Display with root, but I was doing a su - grid, and this user grid was the one with the problem,

the solution was to close this session, and open a new session directly with grid, and it worked, something about doing the su - grid was failing...

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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