File transfer in Linux LAN

Reference: http://www.cnblogs.com/linzhenjie/p/3291466.html

File transfer in Linux LAN

Install ssh service first
sudo apt-get install ssh
Ordinarily transfer files, you can use the scp command
1. Copy the local file to the target machine:
scp filename username@target machine IP:target machine path
Enter password after carriage return
2. Copy the files of the target machine to the local
scp username@target machine IP: target machine filename local path Enter the password after pressing Enter
example:
Copy local files to remote

lzj @ ubuntu: ~ $ scp xs_sdk.tar [email protected]: / home / lzj /

 

Copy remote files to local

lzj @ ubuntu: ~ $ scp [email protected]: / home / lzj / xs_sdk.tar

 

Parameters that can be carried:
Several parameters that may be useful:
-v Show progress. Can be used to view connection, authentication, or configuration errors.
-C Enable compression options.
-P Select port. Note that -p is already used by rcp.
-4 Forces the use of IPV4 addresses.
-6 Forces the use of IPV6 addresses.

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326576342&siteId=291194637