In the past has been on the server tar packaging compression, download to the local computer, and then upload to another server, and then decompression.
In fact, the use of SCP can be directly to copy files or folders.
The SCP is secure copy, which is used for remote file copies. Data transmission uses SSH1, and SSH1 uses the same authentication method to provide the same security guarantee. Unlike RCP, the SCP will require you to enter a password if needed.
The simplest applications are as follows:
SCP Local username @ip address: filename 1 remote username @ip address: filename 2
[Local username @ip address:] You may need to enter the password for the remote user name without entering it.
Several parameters that may be useful:
-V, as in most Linux commands, is used to show progress. Can be used to view connections, authentication, or configuration errors.
-C enables compression options.
-P Select the port. Note-P has been used by RCP.
-4 forcibly use IPV4 address.
-6 forcibly use IPV6 address.
Many of the parameters in the SCP are related to SSH1 and are needed.
For example, copy a single file command:
SCP file Username@ip:filepath
Description: File is the filename to copy
Username: User name for remote login,
IP: Remote server IP
FilePath: Remote file path
Copy folder commands are as follows: Scp-r file Username@ip:filepath
Add a-R parameter.