in reply to Re: Re: New Module: Net::SSH
in thread New Module: Net::SSH

The version of gcc I use is actually more recent:

gcc -v Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux/2.95.3/specs gcc version 2.95.3 19991030 (prerelease)

I am actually really surprised you managed to compile Crypt::IDEA, according to CPAN Testers it needs a patch to work even on Solaris.

The error I get is:

IDEA.xs: In function `XS_Crypt__IDEA_crypt': IDEA.xs:66: `sv_undef' undeclared (first use in this function)

Which might be realted to an earlier warning:

 Please specify prototyping behavior for IDEA.xs (see perlxs manual)

I don't know enough about xs to do much more here.

Replies are listed 'Best First'.
(XS fix and first impressions) Re: New Module: Net::SSH
by dchetlin (Friar) on Jan 11, 2001 at 17:45 UTC
    The problem is that Crypt::IDEA has not been updated to handle Perl 5.6's namespace changes. An error message looking like that is a dead giveaway. You didn't mention the version of Perl that you're running, but I'll eat my left hat if it's not 5.6+, and I'll eat my right hat if btrott isn't working with 5.005_03 or lower.

    Solution: run perl Makefile.PL POLLUTE=1, and then re-run make.

    ObNet::SSH - I got it compiled without much trouble, but ran into three separate errors on trying to connect to the three hosts on which I have ssh access:

    [~/src/Net-SSH-0.01] $ perl -Iblib/lib -mNet::SSH $s=Net::SSH::->new("host1"); $s->login("xxxxx","xxxxx"); print $s->cmd("ls"); __END__ Received server public key (768 bits) and host key (1024 bits). Corrupted check bytes on input at blib/lib/Net/SSH.pm line 135 [~/src/Net-SSH-0.01] $ perl -Iblib/lib -mNet::SSH $s=Net::SSH::->new("host2"); $s->login("xxxxx","xxxxx"); print $s->cmd("ls"); __END__ Received server public key (768 bits) and host key (1024 bits). Didn't expect to get packet of type 15 at - line 3 [~/src/Net-SSH-0.01] $ perl -Iblib/lib -mNet::SSH $s=Net::SSH::->new("host3"); $s->login("xxxxx","xxxxx"); print $s->cmd("ls"); __END__ Received server public key (768 bits) and host key (1024 bits). Can't open /etc/ssh_known_hosts: No such file or directory at - line 3

    I looked around the code a bit, and it looks quite impressive. I'm looking forward to being able to play with it more. Keep up the good work!

    -dlc

      > I'll eat my left hat if it's not 5.6+, and I'll eat my right > hat if btrott isn't working with 5.005_03 or lower.
      Yep. Thanks for clearing this up!

      W/r/t the Net::SSH errors:

      Corrupted check bytes on input at blib/lib/Net/SSH.pm line 135
      This one bothers me slightly. Though you didn't get the same problem for the other hosts, which is good. Could be a problem w/ the encryption cipher perhaps; that's when I'd get this sort of message during testing.
      Didn't expect to get packet of type 15
      15 is a failure message from the server. This is partly due to my not-so-robust error checking at this point. This error message occurs during the client loop after executing the command remotely; only certain packets are expected. Failure isn't an option, ha ha. :)

      Anyway, I'll look at this; don't know why trying to run a command would cause failure.

      Can't open /etc/ssh_known_hosts
      This is fairly self-explanatory; host3 must not be in your ~/.ssh/known_hosts (or the host keys didn't match--not yet distinguishing this from new hosts), so Net::SSH tried to look in /etc/ssh_known_hosts... which doesn't exist.

      Anyway, thanks very much for the error reports. When trying to fix the errors I may now get in contact with you and ask you to rerun them after I implement some better debugging tools.