in reply to Unable to determine known_hosts location (-16 LIBSSH2_ERROR_FILE)

G'day BernieC,

I'm not a user of Net::SSH2, but looking at its documentation and its source it would seem LIBSSH2_HOSTKEY_POLICY_TOFU should be a constant: try removing the quotes.

If that doesn't work, providing additional information may help others to troubleshoot your problem.

See also: "Net::SSH2: Error handling"; in particular, its reference to check_hostkey.

— Ken

Replies are listed 'Best First'.
Re^2: Unable to determine known_hosts location (-16 LIBSSH2_ERROR_FILE)
by hippo (Archbishop) on Oct 18, 2023 at 18:29 UTC
    it would seem LIBSSH2_HOSTKEY_POLICY_TOFU should be a constant: try removing the quotes.

    Just as discussed 2 days ago in the original thread.


    🦛

      ++ I thought it sounded familiar; couldn't pinpoint it though. Thanks.

      — Ken

      Bareword "LIBSSH2_HOSTKEY_POLICY_TOFU" not allowed while "strict subs" in use
        You ought to read the replies, too: Re^3: error_know_host error

        map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]