This is a discussion on X connection through router and firewall within the Linux Networking forums, part of the Linux Forums category; Hello all, I am having problem in establishing an X connection with my work machine. Let me explain the situation ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hello all,
I am having problem in establishing an X connection with my work machine. Let me explain the situation in some more detail. All machines are running linux. My computer at work is behind a firewall. So, when I need to connect to it I have to ssh to hostA (firewall), which upon successful authorization, it connects me directly to hostB on my office network. If -X option is used with ssh, hostB tries to set its DISPLAY variable to hostA's display, which fails. At home I am using a DSL connection with a router. My home machine gets a static IP from the router. I have set my router to forward port 22 to my machine and ssh connection to my home machine works fine. If I do ssh -X from my home machine to hostC ( which is on some other network and not behind any firewall ), I can open any X client on hostC successfully. Also I can open a sshed X connection on hostB from hostC after proper xauthorization ( hostB and hostC are on different network). I tried to forward the display port on hostB to my home machine port 6000 using ssh -R option, but X server on my home machine is refusing that connection ( my router is also forwarding port 6000 ). I have added hostB's xauth magic key to my home machine's xauth list. Any suggestions. Thanks in advance. |
|
|||
|
[Followups set to COLN]
In comp.os.linux.networking Sourin <sourin@lycos.com> wrote: > My computer at work is behind a firewall. So, when I need to connect > to it I have to ssh to hostA (firewall), which upon successful > authorization, it connects me directly to hostB on my office network. So you've told it to run ssh in your .bash_profile or similar? Icky. > If -X option is used with ssh, hostB tries to set its DISPLAY variable > to hostA's display, which fails. The display variable should be untouched, and when displayed, it should be like localhost:10. Make sure you are net setting DISPLAY anywhere in your login scripts. From your home machine, try doing the following. You might like to have a look at my sshmh program, which you can find on my website. ssh -CAXt user@hostA ssh -AXt user@hostB This is most easily done if you have SSH keys set up. -- Cameron Kerr cameron.kerr@paradise.net.nz : http://nzgeeks.org/cameron/ Empowered by Perl! |