Saturday, March 28, 2020

SCP commands

Syntax:
scp <source> <destination>

To copy a file from B to A while logged into B:

scp /path/to/file username@a:/path/to/destination

To copy a file from B to A while logged into A:

scp username@b:/path/to/file /path/to/destination

Here's an example.  Run this from B to pull data from A. 
This one shows it using port 2223 for the SSH session

scp -P2223 root@192.168.3.11:/mnt/videos/* /volume1/movies/

No comments:

Post a Comment