How do I copy a file under two Linux system servers? Always use this named SCP (security copy).
Do not know the reason for this command, and then do a summary:
We all know that CP command is used as CP [source file address (i.e. to copy file location)] [Destination address (where to copy files to)]
Example: Cp-r./sample/test
The use of the SCP is also probably known by using the CP,
SCP is the same as CP to have the source file location destination file location But at this time if the target file Execution SCP command
Example: SCP remote source file host SSH login username password to destination host address
SCP [Email protected]:/usr/local/test.zip/usr/local
If the location of the execution name command is on the source file host, it is
scp/usr/local/test.zip [Email protected]:/usr/local/
Copy the file as above,
If the copy of the folder is to be added to the-R
Scp-r/usr/local/[Email protected]:/usr/local/test
Note points to use for SCP naming: SSH port number between two servers is not 22 o'clock port number Verification
Scp-p (here is the uppercase p because the lowercase p is already occupied by RCP)
Example: Scp-p 52222 (SSH port number of the target host)-r/usr/local/[email Protected]:/usr/local/test
This article is from the "Technical Lazy people" blog, please be sure to keep this source http://verify.blog.51cto.com/7460015/1559022
Linux SCP command usage and attention points