I have managed to get remote X windows working via SSH. From a Windows 2000 desktop I can run X applications on my server at home. The steps involved are approximately as follows (i.e. I frigged around a bit but I think this will work):
Install Cygwin. In particular, install the openssh and X11 base packages.
Edit the sshd_config file on the remote server and make sure this is set:
X11Forwarding yes
and restart sshd. This is important for avoiding the need for xauth
start X on the remote computer.
on the remote computer run:
xhost +
This turns off strict access control. I am not entirely sure this command is needed when using ssh X port forwarding but I don't think it will hurt. Both local and remote systems are behind firewalls with an encrypted ssh link between then and I am not paranoid enough to worry about extra security.
on the local pc run the cygwin command startxwin.bat. This should bring up a window with a X desktop in it.
from a terminal window on the X desktop, run an ssh command of the form:
ssh -X -l <username> <host address>
the -X tells ssh to do magic X port forwarding .
again in the terminal window, do this to check things are ok:
export | grep DISPLAY
you should see that the DISPLAY variable has been set to something like 127.0.0.1:10.0. Setting this up is the job of the sshd server. If it is not there then the X port forwarding is broken.
run an X program, e.g.:
xterm &
You should get a new term on your desktop running from the remote computer. I got as far as running mozilla across this but it was too slow to be of any use (12kbytes/sec upload speed achieved by Bit Torrent yesterday).
Cygwin defaults to twm which is a little primitive. I tried WindowMaker but that crashed. fvwm2 works, looks a little prettier than twm but is not much more sophisticated.
It's cool, but an awful lot can be done with just a straight ssh console.
|