Automating Telnet

Posted on 2009-04-23
Last Modified: 2013-11-10
We're trying to telnet into an appliance from a remote computer... without logging into the remote computer.  We've gotten something close to what we need by using SendKeys (VBscript), but the script only works if we're logged into the remote computer watching the script run.  We know this is because of how SendKeys works.

Is there something similar to SendKeys we could use to accomplish this? Something that is able to 'work in the background'?  At this point, we're not limiting ourselves to VBscript...  
Question by:kbws1
    LVL 38

    Assisted Solution

    You can use Plink, a command-line tool which comes with PuTTY, to automate Telnet sessions.
    LVL 12

    Assisted Solution

    If you need more intricate control of the remote system's appliance, consider Expect (Windows version here).  It has long been one of the better tools for automating an interaction with a remote (or local) session.

    Expect, in it's native form, is essentially TCL.  If you are more familiar with other languages, there are packages that supply it for them: Java (ExpectJ); Python (pexpect); Perl (

    (A quick Google search did not result in any apparent Expect packages for VBScript; of course, "expect" is a rather generic term, so it makes it tougher to find.)

    Accepted Solution

    Thank you for the suggestions, however we were requiring something with no involvement from anyone...

    We found a free command line utility called "Logon" that lets us unlock our computer:

    Which then allows us to use our SendKey scripts.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Suggested Solutions

    This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
    A short article about a problem I had getting the GPS LocationListener working.
    An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
    In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now