SPUG: Net::SSH

jlb jlb at io.com
Fri Jun 9 14:31:56 PDT 2006


The syntax you're trying to use seems to be appropriate for 
Net::SSH::Perl, not Net::SSH.  Are you sure you're using the right module?

j

On Fri, 9 Jun 2006, luis medrano wrote:

> 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
> _____________________________________________________________
> Seattle Perl Users Group Mailing List
>     POST TO: spug-list at pm.org
> SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list
>    MEETINGS: 3rd Tuesdays
>    WEB PAGE: http://seattleperl.org/
>


More information about the spug-list mailing list