ssh -R X11 forwarding two three linux boxes

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

While I am at work I run:

    ssh -R 5022:localhost:22 user@host -c blowfish

While I am at home I run:

    ssh -X -p 5022 different_user@localhost -C -c blowfish

So I am now working from home.  The problem is that $DISPLAY is not
set.  This doesn't pose a problem yet because X forwarding is still
sending Xwindows to my home display.  The issue is: after I ssh to
work and then ssh to another network server the $DISPLAY variable is
set to the display of the original machine I ssh'd to and Xwindows are
now sent to it rather than home.

I don't know why $DISPLAY is not set on the original ssh but all I
want is for the windows from the second ssh'd to server to end up at
home.  Is the first problem the cause of the second?  More
importantly, how do I solve the second problem.

Thanks for any help.

Please email responses to me.

Site Timeline