[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1833
  • Last Modified:

Automating Telnet

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...  
3 Solutions
You can use Plink, a command-line tool which comes with PuTTY, to automate Telnet sessions.
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 (Expect.pm).

(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.)
kbws1Author Commented:
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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now