There are 3 common ways to copy files between different Linux:
The first is FTP, which is one of the Linux installation FTP Server, so you can use an FTP client program to copy files.
The second method is to use Samba services, similar to the Windows file copy method to operate, relatively simple and convenient.
The third is the use of SCP commands for file replication.
SCP command:
Scp-r-P /srv/mulux/demo [email protected]:/srv/mulux/
- P Port Note is uppercase P, port is the port number specified for data transfer
1. Command format:
SCP [parameter] [original path] [Target path]
2. Command function:
SCP is the abbreviation for secure copy, and SCP is a secure remote file Copy command under the Linux system based on SSH login. The SCP command for Linux allows you to copy files and directories between Linux servers.
3. Command parameters:
-1 Mandatory SCP command using protocol SSH1
-2 Mandatory SCP command using protocol SSH2
-4 Force SCP command to use only IPV4 addressing
-6 Force SCP command to use only IPV6 addressing
-B Use Batch mode (transfer password or phrase is not asked during transfer)
-C allows compression. (Pass the-c flag to SSH to turn on the compression function)
-P retains the original file's modification time, access time, and access rights.
-Q does not display the transfer progress bar.
- R recursively replicates the entire directory .
-V verbose displays the output. SCP and SSH (1) will display debugging information for the entire process. This information is used to debug connections, authentication, and configuration issues.
-C cipher encrypts the data transfer with cipher, and this option is passed directly to SSH.
-F ssh_config Specifies an alternative SSH configuration file that is passed directly to SSH.
-I identity_file the key file used to read the transfer from the specified file, and this parameter is passed directly to SSH.
The-L limit limits the bandwidth that the user can use, in kbit/s.
-O ssh_option If you are accustomed to using the parameter passing method in Ssh_config (5),
-P Port Note is uppercase P, port is the port number specified for data transfer
-S program specifies the programs that are used to encrypt the transmission. This program must be able to understand the options for SSH (1).
Office Remote transfer File commands three ways to Linux