SSH on windows

G

gil

Hi,

In the last week I'm trying to use Net::SSH unsuccessfully (Windows).

when trying to compile:

use Net::SSH;

my $ssh = new Net::SSH($host, [options]);
$ssh->login('user', 'pass');
my ($out, $err, $exit) = $ssh->cmd('ls');

I receive (after editing Perl.pm) :

Global symbol "$home" requires explicit package name at C:/usr/Perl/
site/lib/Net
/SSH/Perl.pm line 112.
Compilation failed in require at C:/usr/Perl/site/lib/Net/SFTP.pm line
11.
BEGIN failed--compilation aborted at C:/usr/Perl/site/lib/Net/SFTP.pm
line 11.
Compilation failed in require at hello.pl line 3.
BEGIN failed--compilation aborted at hello.pl line 3.

*when I change the value of $home, I receive other errors.


When using Net::SSH::W32Perl, I get some other endless line of errors.



Did some one succeed using SSH on windows???? if yes, which packages
should I use?

Thanks,
Gil
 
J

J. Gleixner

gil said:
Hi,

In the last week I'm trying to use Net::SSH unsuccessfully (Windows).

when trying to compile:

use Net::SSH;

my $ssh = new Net::SSH($host, [options]);
$ssh->login('user', 'pass');
my ($out, $err, $exit) = $ssh->cmd('ls');

I receive (after editing Perl.pm) :

Global symbol "$home" requires explicit package name at C:/usr/Perl/
site/lib/Net
/SSH/Perl.pm line 112.
Compilation failed in require at C:/usr/Perl/site/lib/Net/SFTP.pm line
11.
BEGIN failed--compilation aborted at C:/usr/Perl/site/lib/Net/SFTP.pm
line 11.
Compilation failed in require at hello.pl line 3.
BEGIN failed--compilation aborted at hello.pl line 3.

Well, what's on line 112 in Perl.pm?????????
*when I change the value of $home, I receive other errors.

It sounds like user error, e.g. you left off the 'my' in
my $home = ...;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,035
Latest member
HoTaKeDai

Latest Threads

Top