1. Copy the files on the other server to the local
sudo SCP [Email protected]_ip:/home/aaa/bbb/ccc/ddd/bbb
The above command means to copy the BBB file under the remote server/home/aaa/directory to the local/ccc/ddd/folder (Note: If the server SSH port is 22 can omit the-p parameter, if the server SSH port is not 22 need to add the-p parameter, followed by SSH port number)
2. Copy the directory of another server to local, and need to add the-r parameter on the copy file
sudo SCP -R [email protected]_ip:/home/aaa/bbb//ccc/ddd/
The above command means to copy the BBB directory of the remote server to the local DDD directory
3. Copy the local file to another server
sudo SCP /ccc/ddd/bbb [email protected]_ip:/home/aaa/
The above command means to copy the local BBB file to the AAA directory of the remote server.
4. Copy the local folder to the remote server
Also add-r parameter, please refer to the above
Ubuntu14.04 using SCP remote transfer commands for server file transfer