Scp 049 J

You can use a for loop wrapper if you need to copy multiple source files to different directories on multiple hosts. you could do the same with plain old scp but you'd need an outer loop for the hosts as well as an inner loop to do the scp s. Also, pdcp copies to multiple machines in parallel, not one at a time.

Scp 049 J 1

scp files from multiple directories on local to multiple directories on ...

Scp 049 J 2

The lowercase p switch is used with scp for the preservation of times and modes. Here is an excerpt from scp's man page with all of the details concerning the two switches, as well as an explanation of why uppercase P was chosen for scp: -P port Specifies the port to connect to on the remote host. Note that this option is written with a capital 'P', because -p is already reserved for ...

Scp 049 J 3

6 If you're running this scp command on the remote machine, it is looking for file.ext as a "local" file, i.e. on the remote machine. To copy a file from the remote machine to the local one, use scp -P 2222 username@domain:dir/file.ext localdir (assuming that file.ext is in ~/dir on the remote computer, as in your example).

Scp 049 J 4

Use scp to transfer a file from local directory X to remote directory Y ...

Scp 049 J 5

Using the stock 'scp' from a recent Windows Server 2022 version I was able to use the command from this answer above, but with using a colon in the drive specifier, as the first path segment on the target Windows machine: scp some_file user@host:/C:/TEMP