Good Day All
I am experiencing some strange problems when I telnet to an AIX Unix box. I login Successful, but when I execute a unix call eg. ls -l it does not return any data. If someone knows how to solve this problem or got some advise please help
#!/usr/bin/perl -w
use strict;
use Net::Telnet();
my $Servers = qw|goblin|;
my $username = qq|test|;
my $password = qq|12345|;
my $timeout = 30;
my $t = new Net::Telnet( Timeout => $timeout, Prompt => '/[\w:\w:\w+]$/' );
print qq|Open $Server\n|;
$t->open ( qq|$Server| );
print qq|Login $Server\n|;
$t->login ( $username, $password );
print qq|Done Login $Server\n|;
foreach my $user ( sort @UserList )
{
chomp $user;
my $hostname = $t->cmd ( qq|hostname| );
print qq|Hostname: $hostname\n|;
my (@forecast) = $t->cmd ( qq|ls -l| );
print qq|@forecast\n|;
}
Thank you,
Ronald Mundell
Technical Specialist
Information Security
EF24
105 West Street
Sandton
Tel: 011 8813751(W)
0834111107(C)
Emails
cannot be guaranteed to be secure or free of errors or viruses. The sender does not accept any liability
or responsibility for any interception, corruption, destruction, loss, late
arrival or incompleteness of or tampering or interference with any of the
information contained in this email or for its incorrect delivery or
non-delivery for whatsoever reason or for its effect on any electronic device of
the recipient.
If
verification of this email or any attachment is required, please request a
hard-copy version.