Transfer file from remote machine to local machine

Yubin Ruan ablacktshirt at gmail.com
Tue Jul 18 10:22:49 UTC 2017


On Mon, Jul 17, 2017 at 02:28:20AM +0000, J wrote:
> On Sun, Jul 16, 2017 at 20:36 Yubin Ruan <ablacktshirt at gmail.com> wrote:
> 
> > 2017-07-17 4:49 GMT+08:00 Colin Law <clanlaw at gmail.com>:
> > > On 16 July 2017 at 17:15, Yubin Ruan <ablacktshirt at gmail.com> wrote:
> > >> Hi,
> > >> I am having some trouble with transfering file from remote machine to
> > >> local machine.
> > >>
> > >> I got a remote machine A and a remote machine B. Usually I log into
> > >> remote machine A using ssh and then use A as a relay to log into
> > >> remote machine B. But when I am in B, I don't know how to copy file
> > >> directly from B to my local machine.
> > >>
> > >> Because remote machine A is a relay and I don't have write permission,
> > >> I cannot transfer file from B to A. And because B is only visible to A
> > >> (since B is a internal machine), I cannot access B directly from my
> > >> local machine.
> > >
> > > You have not said whether you can access the local machine from B.
> > > Also can you access A from B and can you access local m/c from A?
> >
> > Sorry for that.
> > I cannot access the local machine from either B or  because my local
> > machine is behind a NAT. I can access A from B but I don't have write
> > permission on A (I don't own A. A is used as a relay, so you cannot do
> > much on A).
> 
> 
> How about sshuttle? Running sshuttle to connect to A will create a VPN
> connection via ssh and will set up routes so you should then be able to scp
> from B to Local.

Wow sshuttle is great. I was not aware of that ;-) Thanks.

But, it turns out that I cannot execute any command except `ssh' on remoteA. I
think that is because remoteA is used as a relay and people block it. As a
result, when using sshuttle, I am able to log into remoteA but fail to
establish the VPN connection (cannot execute the python interpreter on
remoteA).

As I said in another reply in this thread, using direct transfer through the
terminal with utils such as `sz' and `rz' would be plausible, but I cannot get
around the terminal issues.

Yubin




More information about the ubuntu-users mailing list