Automatic scp data is not required for login CT

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.