Linux SCP command usage and attention points

Source: Internet
Author: User
Tags scp command ssh port

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.