Secret SFTP&&SCP Command Linux detailed

Source: Internet
Author: User
Tags scp command

Many children's shoes for if you are unfamiliar with the commands for uploading and downloading at the character terminal, here's how to upload and copy files via SFTP and SCP commands.

First look at the SFTP command:

For example: Now I have two VMs, namely 192.168.1.118 and 192.168.1.121, assuming that 121 of the host is a remote server and that there is a user2 user on the server. At this point, you want to upload the/etc/passwd file on 118 to the User2 home directory and copy the User2. bashrc file to the/tmp directory of the 118 host.

Upload command is put, download command is get
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/89/F4/wKiom1gik_jTU6A6AABgjvCpG2U915.png-wh_500x0-wm_3 -wmp_4-s_1569950168.png "title=" Qq20161109111230.png "alt=" Wkiom1gik_jtu6a6aabgjvcpg2u915.png-wh_50 "/>



Take a look at the use of the SCP command:

We usually use sftp to upload or download files, often because we do not know the file name information, if we already know the file name information, then the simplest way to transfer is through the SCP this command to copy operations.

The syntax is as follows:

SCP "-PR" "-L Rate" file name [account @] Host IP: directory name--upload command

SCP "-PR" "-l Rate" [Account @] Host IP: FileName Directory name--download command


Options:

-P: Keep the file's original permission information

-r: The entire directory (including subdirectories) can be copied when the source is copied from the directory

-L: Can limit the rate of transmission, in kb/s, for example [-1 800] for transfer rate of 100KB/S


Do your own experiment to verify!!!

This article is from the "Brother Hong Linux World" blog, so be sure to keep this source http://zhengkangkang.blog.51cto.com/12015643/1870995

Secret SFTP&&SCP Command Linux detailed

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.