Machine to completion of the present scp file transfer server

scp命令:Copy files between hosts using Secure Copy Protocol over SSH.

A: from the local to upload files to the server:

-Copy a local file to a remote host: 

scp path/to/local_file remote_host:path/to/remote_file

scp native file path to the user name @ip: server object path

Specific Example of use: there is a file called local_file under local / tmp directory, / tmp The spread user zhangjie

 

 To the server to view uploaded files

 

 

 

Two: download files from the server to the local:

- Copy a file from a remote host to a local directory:

    scp remote_host:path/to/remote_file path/to/local_directory

  scp Username @ip: server object path Path native

Specific Example of use: a remote_file in / tmp directory server, downloaded to / tmp directory of the next

 

 Native view the downloaded file

 

 

 

Guess you like

Origin www.cnblogs.com/zg-8898/p/12608313.html