nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

remote x via ssh gateway

This is a discussion on remote x via ssh gateway within the Linux software forums, part of the Linux Getting Started category; I have a Linux comp( SuSE 9.3) away in a different site. I need to use it to monitor an ...


Go Back   nixCraft Linux Forum > Linux Getting Started > Linux software

Register FAQ Members List Calendar Forgotten your password? Mark Forums Read
  #1 (permalink)  
Old 01-04-2006, 05:04 PM
Member
User
 
Join Date: Jul 2005
Posts: 85
Rep Power: 0
ricc
Default remote x via ssh gateway

I have a Linux comp( SuSE 9.3) away in a different site. I need to use it to monitor an application that can only be viewed thru the GUI.

The situation is this. The site is connected to the net thru a gateway that only allows ssh.

Now, I want to know how can I login into the ssh gateway and do something like have the X-display of the session displayed on my comp this side.

I dont know how to do it, but I know someone who did it.

The syntax is something like this.....

ssh -t -X -l ricc -R 25901:localhost:5901 some.server.com ssh -l ricc -R 25901:localhost:25901 192.168.2.5

Can anyone disect this command line.. and what all it is supposed to do..?


ricc
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 01-05-2006, 07:16 PM
rockdalinux's Avatar
Contributors
User
 
Join Date: May 2005
Location: Bangalore
My distro: RHEL, HP-UX, Solaris, FreeBSD, Ubuntu
Posts: 581
Rep Power: 7
rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough
Default

Quote:
ssh -t -X -l ricc -R 25901:localhost:5901 some.server.com ssh -l ricc -R 25901:localhost:25901 192.168.2.5
First these are two diffrent command and not one command:
Code:
ssh -t -X -l ricc -R 25901:localhost:5901 some.server.com
AND
Code:
ssh -l ricc -R 25901:localhost:25901 192.168.2.5
First command is on your gateway system/router
ssh -t -X -l ricc -R 25901:localhost:5901 some.server.com

-t : Force tty allocation, so that you can see and execute programs on remote system called some.server.com

-X : Enables X11 forwarding

-l ricc : Use this username (ricc) to login on remote system called some.server.com

-R : Port binding 25901:localhost:5901, i.e. means given port on the local client host (25901) is to be forwarded to the given host and port on the remote side (5901). Binding only to localhost, so it will not work by IP or FQDN.

Second command will forward this (above remote) connection to internal host called 192.168.2.5 with ricc as user:
ssh -l ricc -R 25901:localhost:25901 192.168.2.5

All you to do is use port 25901 on 192.168.2.5 to access service provided by server called some.server.com port 5901. Since tcp port 5901 is used by VNC server, use vnc client on your system, put hostname localhost, port 5901 and your usermame/password and you should have remote server display securely

So all it does it:

Code:
Remotebox -> Router -> Your system
With                                  VNC client connects to localhost port 5901
VNC
SERVER
In otherwords you are bypassing firewall and setting up tunnel to get remote x server display on local system.

I hope this helps, if you have more question feel free to reply back
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!

If you have knowledge, let others light their candles at it.

Certified to work on HP-UX / Sun Solaris / RedHat
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Not able to connect using remote desktop aliment CentOS / RHEL / Fedora 0 04-14-2008 01:42 PM
Remote setup tutorial satimis Getting started tutorials 3 03-28-2008 11:02 AM
problem with remote command praveenmall Shell scripting 1 03-22-2007 01:49 AM
Help in setting up an email server and net gateway ricc Mail Servers 2 01-04-2007 10:33 AM
Remote CVS Access rajuk Linux software 4 10-20-2006 11:41 AM


All times are GMT +5.5. The time now is 09:43 PM.


Powered by vBulletin® Version 3.7.4 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36