BernieC has asked for the wisdom of the Perl Monks concerning the following question:
The error is on the check_hostkey line. I wrote this program long ago and I neither know why it stopped working nor what is wrong. Apparently "back in the day" it know how to find the known_hosts but now it doesn'tmy $ssh2 = Net::SSH2->new() ; $ssh2->connect(HOST) or $ssh2->die_with_error ; # $ssh2->check_hostkey(tofu => HOSTKEY) $ssh2->check_hostkey("LIBSSH2_HOSTKEY_POLICY_TOFU") or $ssh2->die_with_error ; $ssh2->auth_publickey(USER, PUBLICKEY, PRIVATEKEY) or $ssh2->die_with_error ; $ssh2->auth_ok() ;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Unable to determine known_hosts location (-16 LIBSSH2_ERROR_FILE)
by choroba (Cardinal) on Oct 18, 2023 at 17:17 UTC | |
by Discipulus (Canon) on Oct 20, 2023 at 06:52 UTC | |
|
Re: Unable to determine known_hosts location (-16 LIBSSH2_ERROR_FILE)
by kcott (Archbishop) on Oct 18, 2023 at 17:47 UTC | |
by hippo (Archbishop) on Oct 18, 2023 at 18:29 UTC | |
by kcott (Archbishop) on Oct 18, 2023 at 19:03 UTC | |
by BernieC (Pilgrim) on Oct 19, 2023 at 16:37 UTC | |
by choroba (Cardinal) on Oct 19, 2023 at 16:48 UTC |