Here is what I've tried.
I've edited /etc/ssh/sshd_config on the remote AIX system
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes
as well as set $DISPLAY
DISPLAY=localhost:10.0
export DISPLAY
…reboot
connect via RHEL
ssh -X me@hostname
run xclock
xclock
get the following output:
X11 connection rejected because of wrong authentication.
X connection to localhost:10.0 broken (explicit kill or server shutdown)
also xauth list
doesn't print anything.
Best Answer
I presume this is in your shell startup files (
.bash_profile
or similar)? Try removing it.ssh -X
automatically sets this variable for sessions where it's forwarding X. It shouldn't be necessary for you to set this variable manually, and you may be setting it to the wrong value.By way of background, the default TCP port for X is 6000, corresponding to "localhost:0.0".
ssh -X
normally starts with port 6010, which corresponds to "localhost:10.0", and works upwards until it finds a free port. If port 6010 was in use, then it might bind to 6011 and set DISPLAY to "localhost:11.0". This is why you should letssh
set DISPLAY for you.