LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 01-21-2010, 03:42 PM   #1
vockleya
Member
 
Registered: Aug 2009
Posts: 79

Rep: Reputation: 16
SSH tunnel over SSH tunnel


I have a setup of 3 computer, 2 of which are servers, and am trying to set up a secure connection between them. The setup goes "my computer"->-"local server"->-"remote server". I currently have an ssh proxy set up to the local server from my computer. I would now like to set up another ssh proxy from my computer to the remote server, via the local server. Is this possible?
 
Old 01-22-2010, 09:19 AM   #2
quanta
Member
 
Registered: Aug 2007
Location: Vietnam
Distribution: RedHat based, Debian based, Slackware, Gentoo
Posts: 724

Rep: Reputation: 100Reputation: 100
Can you explain in more details? What OS do you run? Can you ssh direct to remote from your computer?
 
Old 01-22-2010, 02:16 PM   #3
vockleya
Member
 
Registered: Aug 2009
Posts: 79

Original Poster
Rep: Reputation: 16
I am currently running Ubuntu 9.10. My computer is stuck behind a firewall, which is causing me problems, especially with ssh. The local server does not have this problem. I want to use an ssh tunnel (ssh -D 8080 -fCqN local-server) to the local server to be able to tunnel the ssh traffic around the problem firewall. In short I want the create one ssh tunnel, and then route a second ssh connection over the first tunnel.
 
Old 01-22-2010, 04:45 PM   #4
bret381
Member
 
Registered: Nov 2009
Location: Alabama
Distribution: Arch x86_64
Posts: 648

Rep: Reputation: 78
if your computer is behind a firewall blocking ssh traffic out, then it doesn't matter where you are wanting to go, until you open port 22, your not going to be able to connect.
 
Old 01-22-2010, 04:54 PM   #5
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware -current, 14.1
Posts: 1,019

Rep: Reputation: 157Reputation: 157
Perhaps what you're attempting to do is similar to what's being attempted, and answered, here:

http://www.linuxquestions.org/questi...neling-767875/

cheers
 
Old 01-22-2010, 05:29 PM   #6
kinetic
Member
 
Registered: Aug 2007
Location: Fort Collins, Colorado
Distribution: Gentoo
Posts: 64

Rep: Reputation: 17
Here's how I would do it:

In a free terminal:
Code:
computer# ssh local_server -L 2222:127.0.0.1:2222
Password:

local_server# ssh remote_server -L 2222:127.0.0.1:22
Password:

remote_server#
Then, if you want to connect to the remote server directly, you can just connect to port 2222 on localhost.

For instance, if you want to proxy through the remote server: ssh -D 8080 -fCqN -p 2222 localhost
 
Old 01-22-2010, 06:25 PM   #7
vockleya
Member
 
Registered: Aug 2009
Posts: 79

Original Poster
Rep: Reputation: 16
Thanks everybody.
 
  


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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to tunnel everything over ssh iamacup Linux - Networking 1 06-30-2009 04:33 PM
ssh tunnel ramesh14 Linux - Newbie 2 12-30-2008 01:11 AM
setting up an ssh soxy or local ssh tunnel from within an ssh soxy Mangenius Linux - Networking 0 03-05-2007 03:15 PM
ssh tunnel crep Linux - Networking 2 08-25-2004 08:24 PM
Ssh Tunnel tinaa Linux - Software 7 07-29-2003 07:52 PM


All times are GMT -5. The time now is 04:17 PM.

Main Menu
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