An SCP explanation of common Linux commands

Source: Internet
Author: User
Tags scp command

Prerequisites for using SCP:

1, the service side started the SSHD service

2, both local and remote systems must have the SCP this command, that is, the openssh-clients Package

"Installation Method"

[Email protected]5201351yuminstall /usr/bin/SCP -y            // Method One [Email protected]5201351yuminstall openssh-clients-y         // Method Two

Help on the use of commands is as follows

SCP [ -1246BCPQRV] [-C Cipher] [-F Ssh_config] [-i identity_file]           [-L limit] [-O ssh_option] [-P port] [-S Program]           [[Email Protected]]host1:]file1 ... [[Email Protected]]host2:]file2

Now many servers for security, will change the SSH default port 22, changed to a special port. So when it comes to SCP or SFTP

It is necessary to specify which port to migrate through. Now, special note this special port to the SCP command. Now suppose this port is 22123

"Local-----> remote"

[Email protected]5201351SCP22123 /5201351. txt [email protected]192.168 . 100.2:/opt             // Copy Local file to remote server [[email protected]5201351SCP  22123 /5201351  [email protected]192.168.  100.2:/opt             // Copy Local directory to remote server

"Remote-----> local"

[Email protected]5201351SCP22123 [email protected]192.168. 100.2:/root/nrpe-2.15. tar. gz/opt   // copy remote file to local [[email protected]5201351SCP  22123 [email protected]192.168. 100.2:/root/abc/opt             // copy remote directory to local

An SCP explanation of common Linux commands

Related Article

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.