Command: SCP
There are 3 common ways to copy files between different Linux types:
The first is FTP, which is one of the Linux installation FTP Server, this can be another use of FTP client program for file copy.
The second approach is to use the Samba service, similar to the Windows file copy of the way to operate, more concise and convenient.
The third way is to use the SCP command for file copying.
The SCP is a security file copy, based on SSH login. Easy to operate, such as to the current one file copy to a remote other host, you can command the following.
Scp/home/daisy/full.tar.gz Root@172.19.2.75:/home/root
You will then be prompted to enter the login password for the other 172.19.2.75 host's root user, and then copy it.
If you want to reverse the operation, it is also easy to copy the files from the remote host to the current system.
SCP root@/full.tar.gz 172.19.2.75:/home/root/full.tar.gz home/daisy/full.tar.gz
Linux's SCP commands allow you to copy files and directories between Linux;
Example
SCP [ -1246BCPQRV] [-C cipher] [-f ssh_config] [-I identity_file] [-l limit] [-O ssh_option] [-P port] [-S program] [[user@ ]host1:]file1 ... [[User@]host2:]file2
DESCRIPTION:SCP copies files between hosts on a network.
Transferring files using the SCP
1, download files from the server
SCP username@servername:/path/filename/tmp/local_destination
For example, the SCP Codinglog@192.168.0.101:/home/kimi/test.txt put 192.168.0.101 on the/home/kimi/test.txt
File Download to/tmp/local_destination
2, upload local files to the server
Scp/path/local_filename Username@servername:/path
For example, scp/var/www/test.php codinglog@192.168.0.101:/var/www/the test.php file in the native/var/www/directory
Upload to the/var/www/directory on the 192.168.0.101 server
3, download the entire directory from the server
Scp-r username@servername:remote_dir//tmp/local_dir
For example: Scp-r codinglog@192.168.0.101/home/kimi/test/tmp/local_dir
4, upload directory to the server
Scp-r/tmp/local_dir Username@servername:remote_dir
For example:
Scp-r test codinglog@192.168.0.101:/var/www/upload the test directory in the current directory to the server/var/www/directory