LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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
 
Search this Thread
Old 02-12-2005, 03:38 AM   #1
muneebs
LQ Newbie
 
Registered: Jan 2005
Posts: 15

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


Hi
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

Thanks
 
Old 02-12-2005, 05:35 AM   #2
angrybeaver
Member
 
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 05:46 AM.
 
Old 02-12-2005, 06:26 AM   #3
muneebs
LQ Newbie
 
Registered: Jan 2005
Posts: 15

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


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


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


All times are GMT -5. The time now is 02:56 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