I am running CentOS/RHEL 6 and having the same issues as described in the referenced question below.
I have tried all of the settings suggested in this almost identical question, but to no avail.
On the server-side I have the following sshd_config settings:
xauth is installed on the server, and after successfully connecting over SSH I do get a MAGIC-COOKIE in
~/.Xauthority. I do not get any xauth related errors.
When I ssh in using
-X (and add verbosity for troubleshooting
-vvv), I successfully connect. When I try to run
xclock it fails with an error of "Can't open display: localhost:10.0". This is a STDOUT error and not an error from the
ssh -vvv. I do NOT receive any failed X11 attempts in ssh.
Then I try to verify the
$DISPLAY variable, but get no output (it's not set).
It there some other setting somewhere that sets
$DISPLAY properly? In this particular case, I can force the setting
export DISPLAY=localhost:10.0, which then returns correctly after running
echo $DISPLAY. Unfortunately, I still do NOT get any X-Windows program (e.g.,
xlcock) to come back. I still get the "Can't open display: localhost:10.0" error.
I'm at a loss. Any suggestions? Anything else that can set
$DISPLAY during an SSH session?
sshd_configfixed this issue on my machine)