Original

Basic Syntax of SCP

1
scp source_file_name username@destination_host:destination_folder

Provider the detail information of SCP process using -v parameter

Baisc SCP command without parameter will copy the files in background. User will see nothing unless the process is done or something error appears.

You can use -v parameter to print debug information into screen.

1
2
# verbose
scp -v source_file_name username@destination_host:destination_folder

Provider modification times, access times, and modes from original files

The -p (lowercase) parameter will help you on this. An estimated time and the connection speed will apear on the screen.

1
2
# process
scp -p source_file_name username@destination_host:destination_folder

Make file transfer faster using -C parameter

One of parameter that can faster your file transfer is -C parameter. The -C parameter will compress your file on the go. The unique thing is the compression is only happen in the network. When the file is arrived to the destination server, it will returning into the original size as before the compression happen.

1
2
# Compression
scp -Cpv source_file_name username@destination_host:destination_folder

Specify specific port to use with SCP

Usually SCP is using port 22 as a default port. But for security reason, you may change the port into another port.

Use -P (uppercase) to specify the port.

scp -P 2212 source_file_name username@destination_host:destination_folder
``