This article will introduce the tutorial on automatic scp data without password for use of reverse CT. I hope this article will be helpful to you.
Today, the company requires that all the backup SQL files on a server be uploaded to the local server of the company, but the local server of the company performs key verification, that is, the key must be used to log on to the local server, the server on the Internet does not perform key verification. Well, drag the data directly from the server to the local server.
The script is as follows:
Vi down. exp
| The Code is as follows: |
Copy code |
#! /Usr/bin/CT-f Set timeout-1 Set passwd your password Spawn scp-r-P18330 root@72.11.x.x:/root/newfile/*/root/bak/ Match_max100000 Verify CT-exact "password :" Send -- "$ passwdr" CT eof |
The execution method is as follows:
| The Code is as follows: |
Copy code |
Chmod + x down. exp Reverse CT down. exp |
In this way, you can copy the backup data on the Internet server to the local server without entering the password.
Ps: to install keep CT
Centos direct yum-y install benchmark CT