LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 11-09-2009, 06:33 AM   #1
netpumber
Member
 
Registered: Sep 2007
Location: In My Box
Distribution: Arch Linux
Posts: 338

Rep: Reputation: 31
SSH chain tunneling


Halo!!

Lets say i have ssh access into 3 servers (A, B, C).

I am the PC. Now how i can do a connection like this :

PC --> A --> B --> C through ssh connection?

So i can browse to the internet with the server's C ip.

Thanks..!
 
Old 11-09-2009, 07:10 AM   #2
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware -current, 14.1
Posts: 1,052

Rep: Reputation: 170Reputation: 170
I'm thinking someone may have a more elegant solution, but you can do it thusly:

B --> C :

ssh -D <choose_port> C

A --> B

ssh -N -f -L <port>:localhost:<port> B

PC --> A

ssh -N -f -L <port>:localhost:<port> A

Set up a SOCKS proxy on PC to localhost:<port>

cheers,

Last edited by mrclisdue; 11-09-2009 at 07:38 AM. Reason: clarification
 
Old 11-09-2009, 08:43 AM   #3
tacorama
Member
 
Registered: Sep 2009
Distribution: Slackware
Posts: 39

Rep: Reputation: 16
netplumber,

Thanks to your question - i felt motivated to read the entire ssh man page. it seems ssh is quite powerful and i am now looking forward to trying some things out.


mrclisdue,

Thanks also for your simple explanation.
 
Old 11-14-2009, 01:58 PM   #4
Karas
Member
 
Registered: Oct 2009
Distribution: Slackware 13.0
Posts: 49

Rep: Reputation: 15
Hi there I have just found this thread after posting a similar one, (oops!) and was wondering if someone could explain how I would do this via putty, and with a PC and machine A and B? Machine B, being the server thats hosting the pages I want to view.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
SSH tunneling entz Linux - Networking 3 04-04-2007 08:22 AM
tunneling thru ssh c9876543210 Linux - Networking 1 07-21-2005 01:45 AM
X tunneling with SSH phekno Linux - Networking 3 05-31-2005 11:43 AM
Tunneling through SSH rech Slackware 1 11-28-2003 09:21 PM
tunneling with ssh barbanero Linux - Security 2 01-24-2002 11:53 AM


All times are GMT -5. The time now is 02:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration