SPUG: Net::SSH

luis medrano lmzaldivar at gmail.com
Fri Jun 9 14:24:11 PDT 2006


Hey list,

I have script where I'm using the Net::SSH module. when I copile the
scripts it show no warnings but when I ran the script it show this
error:

perl  ssh.pl
Can't locate object method "new" via package "Net::SSH" at ssh.pl line 8.

This is the code of my script:

#!/bin/usr/perl
use Net::SSH;
my $user='root';
my $pass='m at 012130';
my $cmd='pwd';
my $host="localhost";
my $ssh = Net::SSH->new($host);
$ssh->login($user, $pass);


I really appreciate if any of you can help me to figure out what is
wrong with this.

Thanks,
Luis


More information about the spug-list mailing list