I have a very small lab network with three boxes: a modern x86-based RHEL3 box, an x86-based RHEL5 box, and a 1998-vintage SPARC Ultra5 with Solaris 8. I can use ssh -X to run a program on the RHEL5 box and view the windows on the RHEL3 box. I believe this uses xauth and magic cookies?? I have followed the X-Windows HOWTO to set up xauth on the Solaris box, but so far no dice. I would like to be able to use the X-windows server on the RHEL3 box with a client program on the Solaris box (program running on Solaris host, windows appearing at Linux host). Is there a trick to this, or have I made a mistake following the instructions for setting up xauth and magic cookie?
There are two options: xauth + magic cookies, where you set the DISPLAY variable to the host you want to see the gui on:
from client-machine ssh to server-machine,
On the other hand, a much better and easier solution is using the -X option for ssh. This sets up an automatic tunnel for forwarding the X connection. You'll see your DISPLAY variable has already been set upon ssh to the localhost with a high display number: usually around 10.
However, you must enable X forwarding. As I recall, it is disabled by default on solaris. Go into your sshd_config and ensure you have it enabled.
P.S. You may find it useful to know that while the solaris ssh client only uses -X, the standard linux client also has -Y for trusted connections. This means that for some applications, only -Y will work (I've had issues with Java GUIs)
|show 4 more comments|