Rotten mud: scp replication for CentOS command learning, rotten mud centos command scp
This article was sponsored by Xiuyi linfeng and first launched in the dark world.
Due to work requirements, you need to copy the files on server A to server B. I am too lazy to build FTP and Samba servers, so I plan to use the scp command, which is replicated through the ssh protocol.
You can view the scp command in the help document. As follows:
Scp -- help
Man scp
Scp [OPTIONS] file_source file_target
OPTIONS:
-V is the same as-v in most linux commands to display the progress. Can be used to view connections, authentication, or configuration errors
-C enable compression options
-P Select Port
-R copy directory
We will first test the local copy of files and directories to the remote server.
Copy an object as follows:
Scp./ilanni.tar.gz root@192.168.1.102:/ks
Scp-r./ilanni root@192.168.1.102:/ks
Scp root@192.168.1.102:/ks. cfg ./
Scp-r root@192.168.1.102:/ks/ilanni ./
We can see that the scp command has successfully copied all the ilanni directories in the/ks directory of the server 192.168.1.102 to the current directory.
The above describes how to use the scp command, which is commonly used.
The newly installed centOS 62 does not have the scp command. How can I install scp?
Yum install scp
After installing a Winscp, you can copy files from centos, but you cannot copy files from Win7 to Centos. What is the problem? Permission?
You do not have the write permission to copy data to the Centos directory.