scp file transfer

Linux scp command is used to copy files and directories between Linux.

scp is a secure copy of the abbreviation, scp remote file copy is based on ssh command for secure login linux system.
scp is encrypted, rcp is not encrypted, scp is an enhanced version of rcp.

Commonly used formats

Transfer files from the local to the server

Transfer a single file
scp loaclfile [email protected]:remotepath

For example:scp /Users/admin/a.txt [email protected]:/home/abc

Transfer folder
scp -r local_folder remote_username@remote_ip:remote_folder 

From the server to the machine transfer a file or folder

Simply put above the machine location and the server can exchange positions
, such as:

scp [email protected]:/home/root/others/music /home/space/music/1.mp3 
scp -r www.runoob.com:/home/root/others/ /home/space/music/

Reference: scp rookie Tutorial

Use problems encountered in the process:

mac linux when there is a problem to transfer files, scp reported Permission denied wrong solution, and then reference blog , file permissions to 777, and then it. But the problem does not seem that a skill, and some other file permissions is not 777, but can be transmitted to the server.

Published 93 original articles · won praise 0 · views 20000 +

Guess you like

Origin blog.csdn.net/Dream_xd/article/details/103948872