Server Fault is a question and answer site for system and network administrators. 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 have two identical servers, server A and server B. If I connect to server A in Putty and enable X11 forwarding in the settings (running XMING on my PC), everything works fine. I can run all the test commands like 'xeyes' or 'xclock' and they work fine too.

However doing the exact same thing on server B results in a

Error: Can't open display: localhost:10.0



on both servers returns the same (localhost:10.0) and both servers are on the same network so the firewall rules are identical (though I'm not sure this is relevant as the commands should go through SSH)

What should I try next to get X11 working on server B?

share|improve this question
up vote 1 down vote accepted

Got it to work in the end. In /etc/hosts there were the lines   server.lan localhost

Reversing those lines so the localhost line was first stopped the errors

share|improve this answer

Probably the server B does not have X11Forwarding enabled in /etc/ssh/sshd_config. Make sure it says yes (and the line is not commented), restart sshd, you should be all set.

share|improve this answer
X11Forwarding is enabled in sshd_config, X11 has worked on this server before but it was a while ago I think – Smudge Jul 15 '11 at 7:30

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.