scp is the abbreviation of secure copy, it is a secure remote file copy command based on ssh login under Linux system. We can use the scp command to copy files and directories between two Linux hosts.
Copy from local host to remote host Common format: scp [optional parameter] Local file or directory remote user name @remote address: remote file or directory
Copy file: scp -P 12333 /home/www/web.tar.gz [email protected]:/home/backup Copy the web.tar.gz file in the /home/www directory to the /home/backup directory of 10.10.0.211, 10.10 The ssh port of .0.211 is 12333.
Copy directory: scp -P 12333 -r /home/www/[email protected]:/home/abc.com/Copy the /home/www/directory and its files to 10.10 In the /home/abc.com/directory of .0.211 (copying the entire directory), the ssh port of 10.10.0.211 is 12333.
Copy from remote host to local host common format; scp [optional parameter] remote username @remote address: remote file or directory local file or directory
is similar to local copy to remote It is enough to swap the local address and the remote address.
scp -P 12333 [email protected]:/home/backup/web.tar.gz /home/test1
scp -P 12333 -r [email protected]:/home /abc.com//home/test2/
Complete Command Format: 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
Parameter Description: [-1246BCpqrv]-1 Forces scp The command uses the protocol ssh1. -2 Forces the scp command to use the protocol ssh2. -4 Forces the scp command to use only IPv4 addressing. The -6 mandatory scp command uses only IPv6 addressing. -B uses batch mode (transfer password or phrase is not asked during transmission). -C allows compression (passing the -C flag to ssh to turn on compression). -p keeps the modification time, access time and access rights of the original file. -q does not display the transfer progress bar. -r Recursively copies the entire directory. -v detailed mode display output. Scp and ssh(1) will show debugging information for the entire process. This information is used to debug connections, verification and configuration issues.
[-c cipher] encrypts data transmissions with cipher. This option is passed directly to ssh.
[-F ssh_config] specifies an alternate ssh configuration file, which is passed directly to ssh.
[-i identity_file] reads the key file used for the transfer from the specified file. This parameter is passed directly to ssh.
[-l limit] limits the bandwidth that users can use, in Kbit/s.
[-o ssh_option] specifies the format used in the delivery.
[-P port] specifies the port number used by the remote host ssh.
[-S program] specifies the program to use for encrypted transmission. This program must be able to understand the options of ssh(1).
A summaryIn order to manage all server accounts and passwords in the enterprise, you can use the Wi
Controlling access to files under Linux is a very important issue. Chmod is a method for modifying f
redhat-5.4 U disk installation process Preparation: FbinstTool.exe-softwareredhat-5.4-boot.fba-boot
One of the best things about Linux is that you can go deep into the operating system to explore how
Easily build your own DNS server under Linux
Linux/Unix operating system is in the desktop control of the intranet
Linux common compression decompression command set
Linux partition knowledge and partition of large disk
Linux system management and maintenance - wget command
Linux uninstall apache method summary
Linux software installation and uninstallation Basic tutorial
Linux port scanning tool nmap use basic tutorial
Linux prompts when you use Mkdir can not create directory ‘test’?
How to switch the English version of Win8.1 Update to Chinese interface
How does the QQ Pinyin input method change the skin?
Wireless network is safe without passwords
Win7 system to view the network speed and network cable failure method
What should I do if the win7 computer prompts the Dpp Viewer Module to stop working?
Solution for Windows Blue Screen after installing Windows xp sp3