jlee has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w use strict; use diagnostics; use Net::Telnet (); if ($#ARGV < 2 || $ARGV[0] eq '-h') { print "Usage: telnet1 <systemName> <username> <password>\n"; exit; } my $t = new Net::Telnet->new(Timeout => 10, Input_log => './inputlog.txt', Dump_log => './dumplog.txt'); my ($systemname, $username, $passwd) = @ARGV; $t->open($systemname); $t->login($username, $passwd); my @lines = $t->cmd("/usr/bin/who"); print @lines;When my perl script does a Telnet::login() to a SuSE Linux machine, it gets the following error (according to my inputlog):
tset: unknown terminal type network Terminal type?Apparently during the initial negotiation, Net::Telnet is specifying a terminal type of "network", which SuSE doesn't recognize. Should I talk to the SuSE people and try to convince them to recognize "network"? The SuSE box is at the following Linux version:
SuSE Linux SLES-7 (PPC) - Kernel 2.4.13-ppc64-SMP (2) > uname -a Linux linux10 2.4.13-ppc64-SMP #2 SMP Fri Jul 19 17:14:18 GMT 2002 ppc64 unknownI'm running on AIX, with the following versions of perl stuff:
~> perl -mNet::Telnet -e 'print "Net::Telnet.pm version $Net::Telnet::VERSION\n";' Net::Telnet.pm version 3.02 ~> perl -V Summary of my perl5 (5.0 patchlevel 4 subversion 0) configuration: Platform: osname=aix, osvers=4.1.5.0, archname=aix uname='aix side5 1 4 008150374c00 ' hint=previous, useposix=true, d_sigaction=define bincompat3=y useperlio= d_sfio= ( ... etcetera ... )Suggestions, anyone?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Net::Telnet "unknown terminal type"
by Flexx (Pilgrim) on Sep 18, 2002 at 16:56 UTC | |
by jlee (Initiate) on Sep 18, 2002 at 17:30 UTC | |
by defyance (Curate) on Sep 18, 2002 at 19:05 UTC | |
by Flexx (Pilgrim) on Sep 18, 2002 at 20:33 UTC | |
by JayBonci (Curate) on Sep 19, 2002 at 08:32 UTC | |
Re: Net::Telnet "unknown terminal type"
by blm (Hermit) on Sep 19, 2002 at 01:56 UTC | |
by Anonymous Monk on Jan 29, 2010 at 01:48 UTC |