#! c:/perl/bin/perl.exe use strict; use Net::SSH::Perl; use Net::Telnet; my $ssh = Net::SSH::Perl->new("RVM701"); $ssh->login("root", "password"); #### F:\SDK\Scripts\D&A>vmlicecheck1.pl The getpwuid function is unimplemented at C:/Perl/site/lib/Net/SSH/Perl.pm line 110. #### my $host = "RVM701"; my $username = "root"; my $password = "password"; my $thost = new Net::Telnet( Timeout => 20, Host => $host, Errmode => "return" ); $thost->login( $username, $password ); my $prompt = "_MYPROMPT_"; $thost->prompt("/$prompt\$/"); $thost->cmd("set prompt = '$prompt'"); # depends on the shell in use. my $command = "ls"; my @out = $thost->cmd($command); $thost->close; #### F:\SDK\Scripts\D&A>vmlicecheck1.pl Can't call method "login" on an undefined value at F:\SDK\Scripts\D&A\VmLicechec k1.pl line 24.