Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 02-12-2005, 04:38 AM   #1
LQ Newbie
Registered: Jan 2005
Posts: 15

Rep: Reputation: 0
How to Tunnel through a ssh server

the situation is that i have 3 pcs..................A , B, C

I am using currently A
Throuhg A i can connect to B using SSH and FTP...............(limited quota)
Through A i cannot connect directly to C

However when i am logged on to B i can connect to C (FTP and ssh)

I was wondering if I could use some way upload a file directly from A to C

Old 02-12-2005, 06:35 AM   #2
Registered: Aug 2004
Location: .au
Distribution: debian, BSD
Posts: 104

Rep: Reputation: 16
Few ways around this.

first way :

Setup the appropriate routes on A and C. ie: On A : route add -net {C's subnet} gw {B's IP in A's Subnet} and on C the same, substituting C and A. As B is direcly inbetween, its safe to assume that it can act as a router - though ensure IP forwarding has been turned on and you have adjusted any firewalling/filters as required to let the traffic pass through B to each subnet.

second way :

Setup something like Squid proxy server on B - it can proxy HTTP/HTTPS *and* FTP... then just setup the 'ftp_proxy' environment variable on C to point to B.

yet another way :

you can tunnel FTP over SSH using the -L option (man ssh). FTP's a little tricky because there's two TCP channels - so once you're logged in, switch your FTP client into passive mode and you should be able to suck down whatever files you need. Obviously, if A can't see C, then you'll need to tunnel onto B, with destination IP:Port as A's IP and port 21 (for FTP). Then just 'ftp localhost' and you should be sweet. Make sure you're not running an FTP server locally though, or could get confusing

hope it makes sense.

Last edited by angrybeaver; 02-12-2005 at 06:46 AM.
Old 02-12-2005, 07:26 AM   #3
LQ Newbie
Registered: Jan 2005
Posts: 15

Original Poster
Rep: Reputation: 0
just a thing do i enter in the passive mode....................
there is no passsive command their


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
SSH Tunnel - need some help on this MeridianRebel Linux - Networking 2 08-11-2005 03:10 PM
ssh tunnel crep Linux - Networking 2 08-25-2004 09:24 PM
ssh tunnel TroelsSmit Linux - Software 2 04-30-2004 04:30 PM
Ssh Tunnel tinaa Linux - Software 7 07-29-2003 08:52 PM
SSH tunnel? tarballedtux Linux - Networking 3 04-09-2002 04:52 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:55 PM.

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