Solved

Tunneling X via SSH

Posted on 2001-06-14
12
842 Views
Last Modified: 2010-03-18
I have 3 machines -- A, B & C.

All 3 machines sit on the same network, except that 'A' is connected over a relatively slow ISDN link.

B is a linux box on the fast network, and C is a Solaris box, from which I need to run X apps.  I want to route the traffic from C->A via B to take advantage of ssh compression. (encryption doesn't hurt either, although it is not my primary concern in this case)

i.e.:

<pre>
          s l o w           fast
     A &lt;-----&gt; B &lt;-----&gt; C
  X Server       SSH Tunnel      Application
</pre>

Ideally, I'd like to use direct XDMCP from 'A' to 'C' (I don't need to broadcast or do indirect query)

BTW, B does not run an X server, although Xvfb is available there if needed.  

Is all of this possible?  How do I go about implementing it?
0
Comment
Question by:IsleOfView
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
  • +2
12 Comments
 

Author Comment

by:IsleOfView
ID: 6190784
hrm....I guess diagrams don't work so well here, but hopefully, you can get the picture.  Let me know if you need any clarification of the setup.
0
 
LVL 3

Expert Comment

by:superschlonz
ID: 6196967
As I read in the manual you should be able to do it this way:

Login with ssh to host B and then look at the DISPLAY variable:
> echo $DISPLAY
This shows something like ':1' or 'hostname:1'
login to host C and set the DISPAY variable using the name of host b and the nuber
which was set in the DISPLAY variable on host b:
> DISPLAY='hostb:1'
> export DISPLAY
(or with csh 'setenv DISPLAY hostb:1').
then start the application.
0
 

Author Comment

by:IsleOfView
ID: 6202358
I've tried as you suggested.

DISPLAY on host B shows <host_b>:10.0

I telnet from B to C, and set the DISPLAY var the same as it is on B.  Trying to start a simple xterm on C results in this message:

X connection to <host_b>:10.0 broken (explicit kill or server shutdown).

I can't see anything in logs on either A or B that would suggest any kind of problem (in fact, nothing is written during the connection attempt).  I have even attempted executing 'xhost +' on both A and B, but that has made no difference.
0
Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

 
LVL 3

Expert Comment

by:superschlonz
ID: 6202843
Sorry, I can't test this here, I would have to reconfigure my firewall.
0
 
LVL 4

Expert Comment

by:tbearden
ID: 6208749
if you can connect directly to a from c and vice versa then go to the remote host and type

export $DISPLAY=host:0.0

on the local machine you will have to type

xhost +remotehost

However, if you have to telnet(or ssh) to b and then to c then you will have to use ssh port forwarding and this can get pretty complicated.
0
 

Author Comment

by:IsleOfView
ID: 6208924
tbearden -- port forwarding is exactly what I'm asking for.  Specifically, I'm looking to take forward of ssh compression, as the link between a and the other hosts is rather slow.  It is impossible to install sshd on c, so I would like to use port forwarding through b to accomplish the task.
0
 
LVL 4

Expert Comment

by:tbearden
ID: 6212445
ok, I haven't had time to test this, but this is how I think it should work.  Ssh from hosta to hostb with:

ssh -R 6000:hosta:6000 hostb

Then telnet to host c and enter:

export $DISPLAY=hostb:0.0

on hosta type:

xhost +hostb

I think this should work.  You can then try running an xterm on hostc.  let us know what happens.
0
 
LVL 4

Accepted Solution

by:
tbearden earned 200 total points
ID: 6212628
ok, I haven't had time to test this, but this is how I think it should work.  Ssh from hosta to hostb with:

ssh -R 6000:hosta:6000 hostb

Then telnet to host c and enter:

export $DISPLAY=hostb:0.0

on hosta type:

xhost +hostb

I think this should work.  You can then try running an xterm on hostc.  let us know what happens.
0
 
LVL 4

Expert Comment

by:tbearden
ID: 6214088
Upon more consideration I am not sure which xhost you need to add, so I would add both of them.

xhost +hostb
xhost +hostc
0
 

Expert Comment

by:CleanupPing
ID: 9078781
IsleOfView:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 9

Expert Comment

by:majorwoo
ID: 9975974
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: tbearden {http:#6212628}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

majorwoo
EE Cleanup Volunteer
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question