Computing.Net > Forums > Networking > automating telnet

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

automating telnet

Reply to Message Icon

Name: alana0246
Date: April 29, 2004 at 06:04:33 Pacific
OS: Solaris
CPU/Ram: 1gb
Comment:

does anyone know of a way of parsing a password and a hostname as a variable to an automated telnet session.

Is there any (perl) scripts that i could download and use to do this from a windows box ideally?

regards

a



Sponsored Link
Ads by Google

Response Number 1
Name: FishMonger
Date: April 29, 2004 at 19:58:37 Pacific
Reply:

Here's the login part of a Perl script; note that this does not include error handling.

Executed on the command line like this:
c:\mytelnet.pl hostname username password


#!perl

use strict;
use Net::Telnet;

my ($host, $username, $pass) = @ARGV;

my $telnet = new Net::Telnet;
$telnet->open($host);
$telnet->login($username, $pass);

Net::Telnet documentation


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Networking Forum Home


Sponsored links

Ads by Google


Results for: automating telnet

Stop Remote Services www.computing.net/answers/networking/stop-remote-services/25126.html

Telnet BAT file or login script www.computing.net/answers/networking/telnet-bat-file-or-login-script/13844.html

Telnet through http proxy? www.computing.net/answers/networking/telnet-through-http-proxy/10230.html