in reply to SSH to a pix

You are on Win32 so you need Net::SSH::W32Perl which is the MSWin32 compatibility layer for Net::SSH::Perl.

cheers

tachyon

Replies are listed 'Best First'.
Re^2: SSH to a pix
by PodMaster (Abbot) on Jun 23, 2004 at 08:36 UTC
    Net::SSH::W32Perl is outdated. I would try patching Net::SSH::Perl, something like
    - fcntl($sock, F_SETFL, O_NONBLOCK) - or die "Can't set socket non-blocking: $!"; + defined( $sock->blocking(0) ) + or die "Can't set socket non-blocking: ${\int$!} : $!";

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

      All Net::SSH::W32Perl does is override the connect method and set a couple of defaults (port 22 and SSH 2). It uses IO::Socket. Net::SSH::Perl uses a vanilla socket so you can't call blocking() method on it as it does not have one.....

      I think protocol => 1 may do the trick.

      cheers

      tachyon

      Thank u very much.

      Patching Net::SSH::Perl didn't work, so I commented the two lines

      fcntl($sock, F_SETFL, O_NONBLOCK) or die "Can't set socket non-blocking: $!";
      This works fine!!!!!!!!

      Thanks a lot

      Nalina
Re^2: SSH to a pix
by Nalina (Monk) on Jun 23, 2004 at 08:27 UTC
    I also tried Net::SSH::W32Perl.

    The script is as follows

    use Net::SSH::W32Perl; my $host = 'xxx.xxx.xxx.xxx'; my $ssh = new Net::SSH::W32Perl($host,debug=>1); $ssh->login('user-id', 'passw');
    Got this error

    Nalina: Reading configuration data /.ssh/config Nalina: Reading configuration data /etc/ssh_config Nalina: Connecting to xxx.xxx.xxx.xxx, port 22. Nalina: Socket created, turning on blocking... Nalina: Remote protocol version 1.5, remote software version Cisco-1.2 +5 Protocol major versions differ: 2 vs. 1 at cisco_ssh.pl line 4
    Please help me!

    Regards

    Nalina

      You PIX looks like it only speaks SSH 1 whereas Net::SSH::W32Perl only speak SSH 2.

      cheers

      tachyon