[LINUX]SCP Command Remote replication

Source: Internet
Author: User
Tags scp command secure copy

These days before the intervention before the system, the use of the building environment to the SCP command, so query how to use the information.


SCP is the abbreviation for secure copy, which is used primarily for remote copy of files and directories between Linux systems

It is easy to copy files and directories remotely from another server, usually without FTP, file sharing or Web file service.


The prerequisites to use:

1 to have the appropriate permissions to operate the remote system

2 the port using the channel is not restricted by the firewall, of course, this port can be specified by the selection, the default port is 22


Basic format

SCP [Optional parameters] File_source File_target

-P Specify port: #scp-P 4588 [email Protected]:/usr/local/sin.sh/home/administrator

-R Recursive Replication directory: Scp-r www.cumt.edu.cn:/home/root/others//home/space/music/

-V to see the execution process


Copy from local to remote:

SCP Local_file [Email protected]_ip:remote_folder_file

SCP Local_file Remote_ip:remote_folder


If you have a user name, then just enter the password on the line, if you do not write the user name will enter the user name and password

[Email protected] ~]# SCP./install.log [email protected]:/tmp/[email protected] ' s Password:install.log

Path to the./install.og Local File

User of root remote system

192.168.30.237 IP for remote system

/tmp/directory for Remote Storage of files


From remote replication to Local:

SCP [Email Protected]_ip:remote_file local_file

[Email protected] ~]# SCP [email protected]:/tmp/install.log/tmp/[email protected] ' s Password:install.log                                                                                         100%   35KB  35.0kb/s   00:00
User name of root remote system

192.168.30.237 IP for remote system

/tmp/install.log path to remote system files

/tmp/folder where files are stored locally


This article is derived from "Orangleliu notebook " Blog, be sure to keep this source http://blog.csdn.net/orangleliu/article/details/38399493

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.