ssh/X with two hops

Robert Mecklenburg mecklen@cimsoft.com
Wed Sep 3 17:44:00 GMT 2003


I'm a newbie at ssh and would like some advice.  I have a home pc
(windows xp) and an office pc (windows xp) behind a firewall/gateway
host (linux).  I want to run X at home and display (on my home X
server) an emacs running on my office pc.  Here is my most recent
attempt:

I have cygwin sshd running on my office machine...

1. startxwin.sh at home

2. In an xterm run "ssh -X -L 22:osaka:2200 gateway" this allows my to
   login directly to my office machine but leaves an unnecessary login
   on the gateway.  X port forwarding works in this login, but it is
   the wrong host.

3. In a new xterm run "ssh -X localhost".  Now I am logged onto my
   office machine and hopefully X ports are being forwarded, but no!

4. When I "echo $DISPLAY" on my office machine the variable is empty.

I have, of course, tried many other permutations of this procedure,
but this seems the closest to correct - but no joy.

Another permutation I've tried is to ssh to the gateway and then ssh
from the gateway to my office pc, but again the DISPLAY variable is
not set even though I use -X.


Any suggestions?

Thanks!
-- 
Robert



More information about the Cygwin-xfree mailing list