rsync several firewalls away - Unix

This is a discussion on rsync several firewalls away - Unix ; Hello, I'm on computer A and I want to rsync a directory on a computer B. In order to connect to B from A I have to connect to the gateway G1 and, once inside G1, I connect to G2. ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: rsync several firewalls away

  1. rsync several firewalls away

    Hello,

    I'm on computer A and I want to rsync a directory on a computer B. In order to
    connect to B from A I have to connect to the gateway G1 and, once inside G1, I
    connect to G2. From G2 I have access to B. If I want to connect to A from B I
    only have to access the gateway G0 before going to A. All those connections are
    made through ssh.

    So, when I want to copy a file from B to A I connect to it through ssh (doing
    all the procedure I've described) and then I copy the file from B to the /tmp on
    G1. I can log to G1 directly from A so I copy the file from the /tmp to A. When
    I need to get some file from A when I'm in B I log into A and copy the file to
    G1's /tmp.

    I want to make that whole process less painful. Ideally I'd be able to directly
    rsync from A to B and vice-versa. I was thinking on writing a shell script that
    would automate the whole procedure, but first I want to check out with you guys
    if there's a better way to do it.

    By the way, A and B are linuxes, G0 is OpenBSD, G1 is FreeBSD and G2 is linux.
    Although that probably doesn't matter much in this case.

    []'s
    Rafael

  2. Re: rsync several firewalls away

    On Mon, 10 Mar 2008 21:05:13 -0300, Rafael C. Almeida wrote:
    > Hello,
    >
    > I'm on computer A and I want to rsync a directory on a computer B. In order to
    > connect to B from A I have to connect to the gateway G1 and, once inside G1, I
    > connect to G2. From G2 I have access to B.


    If I've got my A's, B's, and G's right for what I think you're saying:
    from B, the computer in the middle, do this:
    scp user@a:/file user@c:/file
    Drop the right keys from B on both A and C. So use B, which both A and
    C can reach, to fetch from A and drop on C.


  3. Re: rsync several firewalls away

    On 11 Mar 2008 00:20:54 GMT, Dave Hinz wrote:

    > If I've got my A's, B's, and G's right for what I think you're saying:
    > from B, the computer in the middle, do this:
    > scp user@a:/file user@c:/file
    > Drop the right keys from B on both A and C. So use B, which both A and
    > C can reach, to fetch from A and drop on C.


    Following up to my own post, if the scp works, then move that to the
    rsync over ssh syntax, again initiated from B. The scp is to verify you
    can get there from here, to get the connectivity and authentications set
    up.


  4. Re: rsync several firewalls away

    On 11 Mar 2008 00:20:54 GMT
    Dave Hinz wrote:

    > On Mon, 10 Mar 2008 21:05:13 -0300, Rafael C. Almeida wrote:
    > > Hello,
    > >
    > > I'm on computer A and I want to rsync a directory on a computer B. In order to
    > > connect to B from A I have to connect to the gateway G1 and, once inside G1, I
    > > connect to G2. From G2 I have access to B.

    >
    > If I've got my A's, B's, and G's right for what I think you're saying:
    > from B, the computer in the middle, do this:
    > scp user@a:/file user@c:/file
    > Drop the right keys from B on both A and C. So use B, which both A and
    > C can reach, to fetch from A and drop on C.
    >

    The problem here is that, while C can reach B, and also can A. B can't
    reach neither C nor A. Because there are 3 gateways between A and C.

    There's A and G0; G0 goes to the Internet. Then there's B, which
    connects to G2, which, in turn, connect to G1; G1 access the
    Internet. So by copying files to G1 I can access them both from A and
    B. In this case G1 is just a server in the Internet. But from G1 I
    can't access A nor B.

  5. Re: rsync several firewalls away

    On Mon, 10 Mar 2008 21:53:13 -0300, Rafael C. Almeida wrote:

    > On 11 Mar 2008 00:20:54 GMT
    > Dave Hinz wrote:
    >
    >> On Mon, 10 Mar 2008 21:05:13 -0300, Rafael C. Almeida
    >> wrote:
    >> > Hello,
    >> >
    >> > I'm on computer A and I want to rsync a directory on a computer B. In
    >> > order to connect to B from A I have to connect to the gateway G1 and,
    >> > once inside G1, I connect to G2. From G2 I have access to B.

    >>
    >> If I've got my A's, B's, and G's right for what I think you're saying:
    >> from B, the computer in the middle, do this: scp user@a:/file
    >> user@c:/file
    >> Drop the right keys from B on both A and C. So use B, which both A and
    >> C can reach, to fetch from A and drop on C.
    >>

    > The problem here is that, while C can reach B, and also can A. B can't
    > reach neither C nor A. Because there are 3 gateways between A and C.
    >
    > There's A and G0; G0 goes to the Internet. Then there's B, which
    > connects to G2, which, in turn, connect to G1; G1 access the Internet.
    > So by copying files to G1 I can access them both from A and B. In this
    > case G1 is just a server in the Internet. But from G1 I can't access A
    > nor B.


    This is basically what:

    http://stromberg.dnsalias.org/~strombrg/deep-ssh.html

    ....is for, though I haven't yet tried to combine it with rsync. Pretty
    much if you can reach your far host via interactive ssh commands from
    your near host, then deep-ssh can do so automatically given appropriate
    public keys and authorization files - with a constant number
    of levels of bash quoting - IE they don't increase with the number of ssh
    hops.

    The syntax is UUCP-inspired.


+ Reply to Thread