For example, I want to copy the files in 59.64.30.101 TO THE 59.64.28.78 server. The procedure is as follows:
Run the following command on the 1.59.64.30.101 terminal:
# Ssh-keygen-T RSA
2. After the key is generated, two files, id_rsa id_rsa.pub, will be generated in the/root/. Ssh/folder.
Copy the id_rsa.pub file to 59.64.28.78
Run the following command:
SCP id_rsa.pub root@59.64.28.78:/root/. Ssh/authorized_keys
3. if you copy a file from 59.64.30.101 to the 59.64.28.78 server, you do not need to enter a password.
SCP command application:
Copy a file:
(1) Copy local files to remote
SCP file name root@59.64.28.78: remote path
(2) remotely copy the file back to local
SCP root@59.64.28.78: local path of file name
Copy directory:
(1) copy the local directory to a remote
SCP-r directory name root@59.64.28.78: remote path
(2) remotely copy the directory back to local
SCP-r root@59.64.28.78: directory name local path.