X11 forwarding not working (Centos 6.4)
Hello,
I'm trying to setup X11 forwarding on a server (CentOS 6.4), but it's not working. On the client side (Windows), I've tried connecting both with XManager and using putty with xming, (which both work on other CentOS servers) but they fail with this one server. I can ssh fine, but I'm getting this error: "The remote SSH server rejected X11 forwarding requests." On the server side, I have checked that 'X11Forwarding yes' has been uncommented in '/etc/ssh/sshd_config' and my iptables are accepting 'lo' and port '22'. One strange thing that is happening is that the xhost command always returns: 'xhost: unable to open display ""'. I also checked to see if the $Display variable was defined and it is not. I'm at a loss of what to do next and any help is appreciated. Thank you. |
first thing before you get too far
6.4 6.5,6.6,and 6.7 are ALL unsupported please upgrade to the ONLY supported version in the 6 series CentOS 6.8 Code:
cat /etc/redhat-release there are no repos for 6.4 except the historical Vault |
I am unfamiliar with xmanager but did you also configure x11 forwarding in PuTTy's X11 settings?
|
Did you remember to restart the sshd service after making the changes?
|
Quote:
Ok, I can update the version, but I don't think this is the issue, since all the other servers I can connect to and forward X11 are the exact same old version. Quote:
Quote:
Code:
sudo service sshd restart |
Stupid question but is a desktop running on that particular server?
|
Quote:
|
Quote:
[EDIT] sorry, just reread your response which answers this question. Please ignore |
Logged with ssh on server, what is the output with
Code:
netstat -an | grep '60.*LISTEN' |
Quote:
Code:
tcp 0 0 0.0.0.0:42608 0.0.0.0:* LISTEN |
Looks like X is running and listening on port tcp 6001
If X was forwarded, you should see additional lines like Code:
tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN Code:
ls -l ~/.Xauthority |
Quote:
Code:
-rw-------. 1 XXXX XXXX XX X X XX:XX .Xauthority |
Is there a localhost entry in /etc/hosts, like:
Code:
127.0.0.1 localhost Code:
dmesg | grep sshd |
Quote:
Code:
127.0.0.1 localhost localhost.localdomain |
I don't understand the [server address] on 127.0.0.1 second line, is there an IP here?
|
All times are GMT -5. The time now is 11:27 PM. |