I'm configuring a small computing cluster with CentOS. The last step is setting up X11 forwarding, and here I find problems that I cannot solve.

On all compute nodes except one, I can set up everything by just installing xorg-x11-server-Xorg and xorg-x11-xauth with yum, then starting Xorg (as root). Signing in as any user with ssh -X, X forwarding works without a problem.

However, on the last server, I get the following message when signing in with ssh -X (as root or as any other user) and trying to start an X application (Molden in this case):

X11 connection rejected because of wrong authentication.
Molden: cannot connect to X server host:11.0

I have tried several fixes I have found online, including

  • Disabling SElinux
  • Checking that the ownership of .Xauthority files are correct
  • Deleting .Xauthority
  • Checking that X11 forwarding is enabled in /etc/ssh/sshd_config (and no local ssh_config files exist that can overwrite this)
  • Uninstalling and reinstalling xorg-x11-server-Xorg and xorg-x11-xauth to make sure both packages are installed directly by the root user, not through sudo yum install (I do not understand why this would affect anything, but it has been suggested)

Using verbose mode and checking all system log files gives no further hints to how to solve the problem. The only guess I have is that the hostname configuration is somewhat different on the trouble-causing node. Changing the host name configuration on this server to be the same as on the other servers did not give any results.

Any further suggestions?

  • check firewall settings? systemd? – ILMostro_7 Jun 17 '14 at 9:04
  • 2
    Can you post the output of ssh -vvv -X ...? Putting it on pastebin would suffice. – slm Jun 17 '14 at 9:13
  • 1
    Does ssh -Y make a difference? Please post the output of ssh -vvv -X xterm and of ssh -X strace xterm. – Gilles Jun 17 '14 at 21:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.