If you issue a scp command between 2 remote servers, will the traffic flow directly between the hosts, or will it flow from Remote1 => Local Machine => Remote2?
For example I issue this command on my laptop:
scp [email protected]:/Files [email protected]:/Files
The scp command copies files or directories between a local and a remote system or between two remote systems. You can use this command from a remote system (after logging in with the ssh command) or from the local system. The scp command uses ssh for data transfer.
To copy a directory (and all the files it contains), use scp with the -r option. This tells scp to recursively copy the source directory and its contents. You'll be prompted for your password on the source system ( deathstar.com ). The command won't work unless you enter the correct password.
The SCP command relies on SSH for secure data transfer, meaning it requires a password to authenticate on remote systems. Watch out when copying files with the same name and location, as SCP will overwrite them without warning you.
Looks like it can be done.
Newer versions of scp (since 2011) have the option -3
which will route the traffic through your local machine. This is useful if the hosts are on different networks and can't see each other. Found this on SuperUser. From your linked article it seems like normally the hosts will try to connect directly to each other.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With