1. Implement the Upload file function
Scp-r-P 33030/usr/local/nginx/logs/access_120_2014-09-26.log
2. Implement the download file function
Scp-r-P 33030/opt
3, SSH implementation SCP command without entering password implementation
1) Local machine Sir into public key
[[email protected]Client root]# ssh-keygen-b 1024-t RSA
Generating public/private RSA key pair.
Enter file in which to save the key (/ROOT/.SSH/ID_RSA):
Enter passphrase (empty for no passphrase): <--Enter directly
Enter same passphrase again: <--Direct Input Enter
Your identification has been saved In/root/.ssh/id_rsa.
Your public key has been saved in/root/.ssh/id_rsa.pub.
The key fingerprint is:
49:9c:8a:8f:bc:19:5e:8c:c0:10:d3:15:60:a3:32:1c Root@Client
This will generate two files, Id_rsa and Id_rsa.pub, in the. SSH directory under the user directory, and then copy the contents of the id_rsa.pub to the user directory of the remote machine. File Authorized_keys in the SSH directory. You don't need to overwrite it, just paste it underneath the original content.
linux-no.05 SCP for file copying between different computers