Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've always wanted to get X11 Forwarding to work with PuTTY, and the X Window System I'm using is Xming. When I have Xming running and I establish a new connection to my server, I receive the following after a command:

$ firefox
PuTTY X11 proxy: wrong authentication protocol attemptedPuTTY X11 proxy: wrong authentication protocol attemptedError: cannot open display: localhost:10.168

$ google-chrome
PuTTY X11 proxy: wrong authentication protocol attempted
(google-chrome:7083): Gtk-WARNING **: cannot open display: localhost:10.168

$ gedit
PuTTY X11 proxy: wrong authentication protocol attempted
** (gedit:6990): WARNING **: Could not open X display
PuTTY X11 proxy: wrong authentication protocol attemptedCannot open display:
Run 'gedit --help' to see a full list of available command line options.

$ gnome-system-monitor
PuTTY X11 proxy: wrong authentication protocol attempted
** (gnome-system-monitor:7024): WARNING **: Could not open X display
PuTTY X11 proxy: wrong authentication protocol attempted
(gnome-system-monitor:7024): Gtk-WARNING **: cannot open display: localhost:10.168

How do I fix these errors and get X11 Forwarding to work as a whole?

share|improve this question

migrated from serverfault.com May 6 '13 at 18:13

This question came from our site for system and network administrators.

People who -1 should at least leave a comment explaining their reasoning. –  NobleUplift Oct 10 '13 at 5:57
How to fix this ? –  user568109 Nov 20 '13 at 5:57
You should create an account, ask a new question, and then link it here so that I can see it. –  NobleUplift Nov 20 '13 at 18:51
10,000 views and still a -1... –  NobleUplift Dec 10 '14 at 17:06

3 Answers 3

up vote 1 down vote accepted

Copied from: http://www.math.umn.edu/systems_guide/putty_xwin32.html

Configuring Putty

  • Add Unix hostname
  • Switch Protocol to SSH
  • Type name of session in saved sessions
  • Click 'Save'

<img src='putty_xwin32/default_putty_rev-sm.png'/>

  • Expand the 'SSH' tab from the 'Category' list
  • Choose 'X11' from 'SSH' list
  • Check 'Enable X11 Forwarding'

<img src='putty_xwin32/xfwd_putty_rev-sm.png'/>

  • Choose 'Session' from 'Category' list
  • Click 'Save'

Starting the X Server on Windows

Configuring Xming

Just run "All Programs > Xming Xming" and it should work if you've got PuTTY configured.


  • Start Xming
  • Start Putty
  • Double click on the saved session you want

<img src='putty_xwin32/session_putty_rev-sm.png'/>

  • Enter username and password as requested
  • You should now be able to run X applications from the host on your local desktop

EDIT: To fix the wrong authentication protocol attempted error, try enabling “ForwardX11Trusted yes” in the /etc/ssh/sshd_config file and then restart the OpenSSH server.

share|improve this answer
I literally read the exact same guide (it's how I found out about Xming), but found it completely useless otherwise because it either told me things I already knew or could figure out just by running the two programs. –  NobleUplift May 7 '13 at 2:28
I was kind of able to get X11 forwarding working, but I suppose this answer is the limit as to what you can do for it. I don't know why my question took a -1 though... –  NobleUplift Oct 19 '13 at 22:34
How does it solve the problem. It is just a tutorial to configure x over ssh. –  user568109 Nov 20 '13 at 5:56
@user568109 If you follow these directions and then attempt to call any GUI-based program, it will display locally. –  Kruug Nov 20 '13 at 14:52
ForwardX11Trusted us a client-side setting. Putting this into sshd_config will have no effect at best and will prevent the SSH server from starting up at worst. -1. This is sshd_config versus ssh_config if you are looking for man pages. –  0xC0000022L Aug 7 '14 at 0:02

You can

xauth list


xauth add <your display>
share|improve this answer
Command line is xauth add dpyname protoname hexkey. –  NobleUplift May 7 '13 at 2:37

For me what worked is adding ForwardX11Trusted yes to ~/.Xauthority where ~ is HOME for the user you are trying to connect.

Also when looking for answers here and here I found this needs to be in the ssh config too. Your config is at $HOME/.ssh/config or /etc/ssh/sshd_config. Though mine was already there.

share|improve this answer
sshd_config is the server-side config, whereas the ForwardX11Trusted is a client-side option. -1. –  0xC0000022L Aug 7 '14 at 0:03
@0xC0000022L What makes you think the answer should be exclusive to either server or client ? In this case it may need to be configured on both ends. By it I mean configuring the relevant Forward option and not ForwardX11Trusted. Did you check the link, it is correctly answered in another question. –  user568109 Aug 7 '14 at 5:27
the wording. You refer two ~/.ssh/config and /etc/ssh/sshd_config in reference to the same parameter, which is only available in one of them. I.e. the answer is factually wrong - thus a downvote. It will mislead people and the worst part about it is that it (silently) prevents OpenSSH from starting unless run with high verbosity. For a headless server that's a pretty bad outcome. –  0xC0000022L Aug 7 '14 at 13:18

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.