Has anyone gotten $ssh2->check_hostkey to work with Strawberry on Win7? After much fooling around I managed to get it to try to run with :

$ssh2->check_hostkey(Net::SSH2::LIBSSH2_HOSTKEY_POLICY_ASK(), "d:/prof +iles/known_hosts.pub") or $ssh2->die_with_error ;

That gets me

The authenticity of host 'shell02.theworld.com' can't be established. Key fingerprint is SHA1:17721d6703c62de34708db3cf40acb788fb755bf. Are you sure you want to continue connecting (yes/no)? Non-blocking Re +adLine is not supported on this architecture at C:/Strawberry/perl/vendor/lib/Ne +t/SSH2.pm line 314.

I've tried both _TOFU and_ADVISORY and they don't die on the check_hostkey but get me a

Authentication failed (username/password) (-18 LIBSSH2_ERROR_PUBLICKEY +_UNRECOGNI ZED) at D:\Desktop\sshtest.pl line 15.

when I try to authenticate. SSH2 did create a new entry in my .pub file

shell02.theworld.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDXGlHigbLsh +tD6CHX0uyIEkywwYP5Gnqlkn1BegYYrmWmgVrhN/XkxCyVqJQPVp6wqBK6fwY7jh/2VOM +mdMx4bPOz8sAqDfz6oubXQNbSCA/30IepqEpUEL24XNNrAtG1z9HPQHUoDEZBLNFoNEya +g6eIQaGFKl+GfF0qmo9Xj9jQ1SlPntmGkJj7O91qL5hVNkt7Zm1tRfiN2zvcDWBYHzzy9 +DROsyv1bPg/ycYtDYg+HZ9boBgZOJnEY5SiMlHd7gtIjQCB3wyap0U901+fOUCOGzKCy+ +1eKd5uDPNFeVrvIR4qgSIaS+YcADQUAfpbT73OLWwp4Ei6H6fsE5vCD (Net::SSH2)

which is different than the key in my .pub file for the host from my ssh client. Dunno quite what to try next.


In reply to Can't get $ssh2->check_hostkey to work by BernieC

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.