Networking Forums

Networking Forums > Computer Networking > Linux Networking > ssh/scp forwarding ???

Reply
Thread Tools Display Modes

ssh/scp forwarding ???

 
 
Ben
Guest
Posts: n/a

 
      09-27-2004, 07:15 PM
Hi all,
From home (computer A), I can connect to computer B at university
using SSH. Once I've got a terminal up on B, I can then SSH to computer
C, which is a high performance super cluster where I run my
calculations. Computer C is only accessible from within the uni network.

I am wondering if it is possible to use scp to copy a file directly from
my home computer A to computer C (and vice versa), without having to
copy it to B first (where I've not really got enough user disk space).
Is it possible to set up a connection that only "passes through" B, or
maybe some way of automatically forwarding communication between A and C.
Please bear in mind that while I've got full control of my home PC, I'm
only a basic student user on both B and C.

Thanks in advance

Ben
 
Reply With Quote
 
 
 
 
Bernhard Kastner
Guest
Posts: n/a

 
      09-27-2004, 07:26 PM
Ben schrieb:
> Hi all,
> From home (computer A), I can connect to computer B at university
> using SSH. Once I've got a terminal up on B, I can then SSH to computer
> C, which is a high performance super cluster where I run my
> calculations. Computer C is only accessible from within the uni network.
>
> I am wondering if it is possible to use scp to copy a file directly from
> my home computer A to computer C (and vice versa), without having to
> copy it to B first (where I've not really got enough user disk space).
> Is it possible to set up a connection that only "passes through" B, or
> maybe some way of automatically forwarding communication between A and C.
> Please bear in mind that while I've got full control of my home PC, I'm
> only a basic student user on both B and C.
>
> Thanks in advance
>
> Ben


a SSH Tunnel on machine B should do the work for you
 
Reply With Quote
 
Wayne Throop
Guest
Posts: n/a

 
      09-27-2004, 07:56 PM
: Ben <(E-Mail Removed)>
: From home (computer A), I can connect to computer B at university
: using SSH. Once I've got a terminal up on B, I can then SSH to computer
: C, which is a high performance super cluster where I run my
: calculations. Computer C is only accessible from within the uni network.
: I am wondering if it is possible to use scp to copy a file directly from
: my home computer A to computer C (and vice versa), without having to
: copy it to B first (where I've not really got enough user disk space).
: Is it possible to set up a connection that only "passes through" B, or
: maybe some way of automatically forwarding communication between A and C.
: Please bear in mind that while I've got full control of my home PC, I'm
: only a basic student user on both B and C.

scp -o 'ProxyCommand ssh B connect %h %p' whatnot C:whatnot

You may have to aquire a copy of "connect" to install on B.
Netcat or other such "TCP plumbing" tools could be used there also,
but connect also does socks and http proxying.

http://www.taiyo.co.jp/~gotoh/connect.html

You can put

Host C
ProxyCommand ssh B connect %h %p

in your .ssh/config, and just

scp whatnot C:whatnot
or
ssh C


Wayne Throop (E-Mail Removed) http://sheol.org/throopw
 
Reply With Quote
 
user@domain.invalid
Guest
Posts: n/a

 
      09-27-2004, 09:23 PM
Hello,

I made an IPv6 multicast forwarding patch for vanilla linux 2.6.7
kernels available at

http://clarinet.u-strasbg.fr/~hoerdt...6_mforwarding/

I also ported an IPv6 PIM-SMv2 open source implementation (pim6sd) to
linux at (so you can test it immediately :

http://clarinet.u-strasbg.fr/~hoerdt/pim6sd_linux/

Any comments, tests, suggestions, patches will be greatly appreciated,
thanks.

Cheers,

Hoerdt Mickaël
LSIIT Laboratory - Strasbourg
 
Reply With Quote
 
Justin
Guest
Posts: n/a

 
      09-27-2004, 10:13 PM
Ben wrote:
> Hi all,
> From home (computer A), I can connect to computer B at university
> using SSH. Once I've got a terminal up on B, I can then SSH to computer
> C, which is a high performance super cluster where I run my
> calculations. Computer C is only accessible from within the uni network.
>
> I am wondering if it is possible to use scp to copy a file directly from
> my home computer A to computer C (and vice versa), without having to
> copy it to B first (where I've not really got enough user disk space).
> Is it possible to set up a connection that only "passes through" B, or
> maybe some way of automatically forwarding communication between A and C.
> Please bear in mind that while I've got full control of my home PC, I'm
> only a basic student user on both B and C.
>
> Thanks in advance
>
> Ben

Maybe you should clear it with network operations at your school before
you do so. Running tunneling software and running a risk of opening the
universities network to the outside really isn't the best idea. They
might even have some ideas.
 
Reply With Quote
 
Stachu 'Dozzie' K.
Guest
Posts: n/a

 
      09-27-2004, 10:29 PM
On 2004-09-27, Ben wrote:
> From home (computer A), I can connect to computer B at university
> using SSH. Once I've got a terminal up on B, I can then SSH to computer
> C, which is a high performance super cluster where I run my
> calculations. Computer C is only accessible from within the uni network.
>
> I am wondering if it is possible to use scp to copy a file directly from
> my home computer A to computer C (and vice versa), without having to
> copy it to B first (where I've not really got enough user disk space).
> Is it possible to set up a connection that only "passes through" B, or
> maybe some way of automatically forwarding communication between A and C.
> Please bear in mind that while I've got full control of my home PC, I'm
> only a basic student user on both B and C.


If you log into C computer using private/public key, then you may use
something like that:
tar czf - /path/to/dir | ssh B 'ssh C tar zxf -'

--
Stanislaw Klekot
 
Reply With Quote
 
Kimmo Koivisto
Guest
Posts: n/a

 
      09-28-2004, 06:51 PM
Ben wrote:

> Hi all,
> I am wondering if it is possible to use scp to copy a file directly from
> my home computer A to computer C (and vice versa), without having to
> copy it to B first (where I've not really got enough user disk space).


Port forwarding works but it's not always the best solution. Following
should work


Let's say C has IP address 192.168.100.1 and B has IP address 172.32.0.2. A
has IP address 10.10.10.10.


Connection from A->C
1. Connect to the B and forward local port 6789 to machine C port 22.
#ssh ben-user-in-b@172.32.0.2 -L 6789:192.168.100.1:22

2. scp the file bigfile.txt to the machine C, using local IP and port 6789
#scp bigfile.txt ben-user-in-c@127.0.0.1:/dir-in-machine-c -p 6789


Connection from C->A
1. Connect to the B and forward B's local port 4567 to machine A port 22 and
allow remote hosts to connect to local forwarded ports.
#ssh ben-user-in-b@172.32.0.2 -R 4567:127.0.0.1:22 -g

2. Connect from B to C
#ssh ben-user-in-c@192.168.100.1

3. scp the file bigfile.txt from the machine C, to the machine A, using B's
IP and port 4567
#scp bigfile.txt ben-user-in-a@172.32.0.2:/dir-in-machine-a -p 4567


Regards
Kimmo Koivisto






 
Reply With Quote
 
Ben
Guest
Posts: n/a

 
      09-29-2004, 01:11 AM
Kimmo Koivisto wrote:
> Ben wrote:
>
>
>>Hi all,
>>I am wondering if it is possible to use scp to copy a file directly from
>>my home computer A to computer C (and vice versa), without having to
>>copy it to B first (where I've not really got enough user disk space).

>
>
> Port forwarding works but it's not always the best solution. Following
> should work
>
>
> Let's say C has IP address 192.168.100.1 and B has IP address 172.32.0.2. A
> has IP address 10.10.10.10.
>
>
> Connection from A->C
> 1. Connect to the B and forward local port 6789 to machine C port 22.
> #ssh ben-user-in-b@172.32.0.2 -L 6789:192.168.100.1:22
>
> 2. scp the file bigfile.txt to the machine C, using local IP and port 6789
> #scp bigfile.txt ben-user-in-c@127.0.0.1:/dir-in-machine-c -p 6789
>
>
> Connection from C->A
> 1. Connect to the B and forward B's local port 4567 to machine A port 22 and
> allow remote hosts to connect to local forwarded ports.
> #ssh ben-user-in-b@172.32.0.2 -R 4567:127.0.0.1:22 -g
>
> 2. Connect from B to C
> #ssh ben-user-in-c@192.168.100.1
>
> 3. scp the file bigfile.txt from the machine C, to the machine A, using B's
> IP and port 4567
> #scp bigfile.txt ben-user-in-a@172.32.0.2:/dir-in-machine-a -p 4567
>
>
> Regards
> Kimmo Koivisto
>
>
>
>
>
>

Sorry, this doesn't seem to work. I've had similar advice from other
newsgroups and a couple of forums. I think that the uni firewall is
blocking the ports I try. I think I'll have to talk to the university
computing people to see if they can set something up for me.

Thanks anyway

Ben
 
Reply With Quote
 
Juhan Leemet
Guest
Posts: n/a

 
      09-29-2004, 03:08 AM
On Wed, 29 Sep 2004 01:11:38 +0000, Ben wrote:
> Kimmo Koivisto wrote:
>> Ben wrote:
>>>I am wondering if it is possible to use scp to copy a file directly from
>>>my home computer A to computer C (and vice versa), without having to
>>>copy it to B first (where I've not really got enough user disk space).

>>
>> Port forwarding works but it's not always the best solution. Following
>> should work

[snippage]
>>

> Sorry, this doesn't seem to work. I've had similar advice from other
> newsgroups and a couple of forums. I think that the uni firewall is
> blocking the ports I try. I think I'll have to talk to the university
> computing people to see if they can set something up for me.


Yeah, it is probably best to get the blessing of your uni computer staff.

However, I was wondering about the TCP/IP port forwarding. That should
work? I haven't used it myself, but the documentation describes it fairly
well. Since you don't have root access to the uni machines, you presumably
would have to do some port translation up into the range of user
accessible ports. If you are doing port forwarding like that, I would
think that you could use a more pedestrian file transfer program, like
ftp? The data is already being tunneled, isn't it? So, it seems to me that
there would be little to be gained by tunneling it through ssh again? I
would think that you could link up your local ftp port to be forwarded to
some user port on your ssh remote, then start up a remote-remote ftp to
connect to your remote user port, and that should pop up in your local
machine as an ftp request?!? er, if I haven't already confused everyone
(myself included). I think there should be a solution of that "shape".

--
Juhan Leemet
Logicognosis, Inc.

 
Reply With Quote
 
John Armstrong
Guest
Posts: n/a

 
      09-29-2004, 10:39 AM
On Mon, 27 Sep 2004 19:15:41 GMT, Ben wrote:

> Hi all,
> From home (computer A), I can connect to computer B at university
> using SSH. Once I've got a terminal up on B, I can then SSH to computer
> C, which is a high performance super cluster where I run my
> calculations. Computer C is only accessible from within the uni network.
>
> I am wondering if it is possible to use scp to copy a file directly from
> my home computer A to computer C (and vice versa), without having to
> copy it to B first (where I've not really got enough user disk space).
> Is it possible to set up a connection that only "passes through" B, or
> maybe some way of automatically forwarding communication between A and C.
> Please bear in mind that while I've got full control of my home PC, I'm
> only a basic student user on both B and C.
>
> Thanks in advance
>
> Ben


Don't suppose you have an SSH service running on your home computer? If you
had you could log onto B then scp computerC:myfile computerA:myfilecopy
 
Reply With Quote
 
 
 
Reply

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ip forwarding InuY4sha Linux Networking 9 01-08-2008 10:16 AM
IP forwarding without NAT balzano_1@yahoo.com Linux Networking 2 09-17-2007 07:25 AM
IP forwarding manoj Linux Networking 16 02-28-2006 10:12 PM
X forwarding over ssh -- how? Robert Latest Linux Networking 2 07-15-2005 10:53 AM
IP forwarding on NT4 Andy Williams Windows Networking 11 12-22-2004 02:33 PM



1 2 3 4 5 6 7 8 9 10 11