in reply to Re^3: How can I connect to a Linux Machine from a Windows Box
in thread How can I connect to a Linux Machine from a Windows Box
And I got this in retun!#! 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");
Then I tried thisF:\SDK\Scripts\D&A>vmlicecheck1.pl The getpwuid function is unimplemented at C:/Perl/site/lib/Net/SSH/Per +l.pm line 110.
And this was the result!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;
Please, Can I rely on your legendry kindness and get enlightenment on what’s wrong and how can I rectify this please? Thanks indeedF:\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.
|
|---|