Copy files from one server to another server

Source: Internet
Author: User
Tags scp file scp command secure copy

Use SCP command: SCP is secure COPY,SCP copy files on host. He uses SSH as a data transfer. And with the same authentication and security. SCP will request input password in authentication All files may require a special description of the server and the user to indicate that the file will be copied to/from a server. File replication between two remotely-enabled servers is allowed.

SCP Command options:

-1 Mandatory SCP with protocol 1

-2 Mandatory SCP with protocol 2

-4 mandatory SCP with IPV4 URL

-6 mandatory SCP with IVP6 URL

-B Select Batch mode (prevents password entry)

-C allows compression. Callout-C to SSH to allow compression

-C cipher Select cipher to encrypt data transfer, this option is passed directly to SSH

-F ssh_config Set a variable user configuration to SSH, this option will be passed directly to SSH

-I identity_file choose to be RSA authenticated, read the private password file, this option can be passed directly to SSH

The-L limit limits bandwidth, which is speed, with kbit/s speed.

-O ssh_option can transfer the configuration format from the Ssh_config to SSH, which is helpful in explaining the SCP without a separate SCP file break. About the options are as follows. And their values please refer to Ssh_config

-P port Specifies to connect to the remote connection port, note that this option requires the Ctrip capitalization mode, which should have been reserved for the number of times and mode for-p

-S program specifies an encryption procedure. This program must be readable for all SSH options

-p Specifies the number of changes, the number of connections, and the mode for the original file

-Q Turn off the progress parameters

-R recursive replication the entire parameter is passed out

The-s program specifies an encryption program that can read all SSH options.

-V redundancy mode. Let SCP and SSH print their troubleshooting information, which is useful in troubleshooting connections, authentication, and configuration.

Small example:

[Email protected] www]# scp-r [email protected]192.16. 1.108:/var/www/blog/home/www/Blog  192.16.  1.108:/var/www/blog  #将本地文件copy到服务器, add fill user, default current user

Small Example 1: (copy file from specified port)

20022 -R. /vhost/[email protected]192.168. 0.200

Copy files from one server to another server

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.