SSH on windows

Discussion in 'Perl Misc' started by gil, Sep 11, 2007.

  1. gil

    gil Guest

    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
    gil, Sep 11, 2007
    #1
    1. Advertising

  2. gil

    J. Gleixner Guest

    gil wrote:
    > 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 = ...;
    J. Gleixner, Sep 11, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. loial
    Replies:
    0
    Views:
    386
    loial
    Feb 3, 2009
  2. loial
    Replies:
    0
    Views:
    390
    loial
    Feb 10, 2009
  3. Tench Johnson
    Replies:
    1
    Views:
    278
    Biff Tannen
    Apr 23, 2010
  4. salamond

    net/ssh in ruby. ssh.exec fails

    salamond, Feb 17, 2011, in forum: Ruby
    Replies:
    0
    Views:
    225
    salamond
    Feb 17, 2011
  5. Deepika
    Replies:
    2
    Views:
    198
    Deepika
    Nov 14, 2006
Loading...

Share This Page