[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Transfer a file from a remote to another one


Neither SCP nor SFTP have inherent support for (FXP-like) direct file
transfers between two remote hosts. You always have to SSH into one of
the boxes and initiate the transfer from the remote box by running the
necessary command.

scp nick0@x.x.x.x:file nick1@y.y.y.y:newfile
is equivalent to
ssh nick0@x.x.x.x "scp file nick1@y.y.y.y:newfile"

Regards
Tilo

Am 02.08.2018 um 16:13 schrieb Ahmad Modaghegh:
> As mentioned in documentation (tuts), by using SCP and SFTP, It is
> possible to transfer a set of *LOCAL* file (or directories) through a
> secure SSH connection. But is it possible to transfer Files located on a
> public remote to another one?
> 
> Let's say there is host (serving sshd): x.x.x.x:22 and there is another
> one: y.y.y.y:22 (both on different machines). Now is it possible to
> transfer a file from the first one to another one using lib APIs
> directly (by sending the command from a third-machine)? I'm sure it is
> possible natively on ssh (CLI) as below:
> 
> scp nick0@x.x.x.x:file nick1@y.y.y.y:newfile
> 
> Thanks in advance.
> 
> 


Follow-Ups:
Re: Transfer a file from a remote to another oneAndreas Schneider <asn@xxxxxxxxxxxxxx>
References:
Transfer a file from a remote to another oneAhmad Modaghegh <aiispassw@xxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org