Easy Batch Telnet

Source: Internet
Author: User

For administrators, how can they deal with heavy and troublesome repetitive work? Here we will introduce the batch processing of Telnet. So how should we operate Batch Telnet? We found that VBscript can be used in windows to complete this job.

The following solutions:

First, we create a script named tel. vbs. Here is an example, which can be modified.

'Create Shell object

Set sh = WScript. CreateObject ("WScript. Shell ")

WScript. Sleep 1000

'Send the commands we input to telnet

Sh. SendKeys "open 192.168.1.1"

WScript. Sleep 1000

Sh. SendKeys "{ENTER }"

WScript. Sleep 1000

Sh. SendKeys "password {ENTER }"

WScript. Sleep 1000

Sh. SendKeys "en {ENTER }"

WScript. Sleep 1000

Sh. SendKeys "passord {ENTER }"

WScript. Sleep 1000

'Run the command

Sh. SendKeys "ls {ENTER }"

Then, create a batch. bat batch file:

Rem start telnet

Start telnet.exe

Rem batch telnet

Cscript // nologo tel. vbs

Finally, you only need to run batch. bat to easily create Batch Telnet. I believe that Telnet can be easily solved.

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.