SCP command remotely and locally replicate with each other

Source: Internet
Author: User
Tags scp command secure copy ssh port what is scp
First, what is SCP?
The SCP is a shorthand for secure copy, a command for remotely copying files under Linux, and a similar command with CP, although the CP is only copied natively and cannot cross the server, and the SCP transfer is encrypted. may have a slight effect on the speed.
Ii. What is the use of SCP?
1, we need to obtain a file on the remote server, the remote server does not configure the FTP server, does not open the Web server, and does not share, unable to obtain the file through the regular way, only through the SCP command can easily achieve the purpose. 2, we need to upload the file on the computer to the remote server, the remote server does not open the FTP server or share, can not be uploaded through the conventional way is, only through the SCP command to easily achieve the purpose.
Iii. methods of use of the SCP

1. Default SSH port get file on remote server (download remote server file to Local System)    SCP  [email protected]:/root/xxx.tar.gz xxx.tar.gz
EG:SCP [email protected] Remote server IP address:/root/xxx.zip (server directory)/users/gaoaifei/xxx.zip (local storage directory)---Perform operation on local port 2, get directory on remote server SCP [Email protected]:/root/dirname//home/dirname/

3, upload the local file to the server    scp-r xxx.tar.gz [email protected]:/root/xxx.tar.gz4, upload the local directory to the server    scp-r/home/dir/[email PROTECTED]:/ROOT/DIR/5, several parameters that might be useful:-V is the same as-V in most Linux commands to show progress. Can be used to view connections, certifications, or configuration errors.

-C Enable compression option.

-4 forcibly use the IPV4 address.

-6 forcibly use the IPV6 address.

SCP command remotely and locally replicate with each other

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.