|
NAMECURLOPT_SSH_HOSTKEYFUNCTION - callback to check host key SYNOPSIS#include <curl/curl.h> int keycallback(void *clientp, DESCRIPTIONPass a pointer to your callback function, which should match the prototype shown above. It overrides CURLOPT_SSH_KNOWNHOSTS(3). This callback gets called when the verification of the SSH host key is needed. key is keylen bytes long and is the key to check. keytype says what type it is, from the CURLKHTYPE_* series in the curl_khtype enum. clientp is a custom pointer set with CURLOPT_SSH_HOSTKEYDATA(3). The callback MUST return one of the following return codes to tell libcurl how to act:
DEFAULTNULL PROTOCOLSThis functionality affects scp and sftp EXAMPLEstruct mine {
NOTESWork only with the libssh2 backend. AVAILABILITYAdded in curl 7.84.0 RETURN VALUEcurl_easy_setopt(3) returns a CURLcode indicating success or error. CURLE_OK (0) means everything was OK, non-zero means an error occurred, see libcurl-errors(3). SEE ALSOCURLOPT_SSH_HOSTKEYDATA(3), CURLOPT_SSH_KNOWNHOSTS(3)
|