1CURLOPT_SSH_HOST_PUBLIC_KEY_cSuHrAl2_5e6a(s3y)_setopCtURoLpOtPiTo_nSsSH_HOST_PUBLIC_KEY_SHA256(3)
2
3
4

NAME

6       CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256  -  SHA256 hash of SSH server public
7       key
8

SYNOPSIS

10       #include <curl/curl.h>
11
12       CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256,
13                                 char *sha256);
14

DESCRIPTION

16       Pass a char * pointing to a string containing a  Base64-encoded  SHA256
17       hash  of  the  remote host's public key.  The transfer will fail if the
18       given hash does not match the hash the remote host provides.
19
20

DEFAULT

22       NULL
23

PROTOCOLS

25       SCP and SFTP
26

EXAMPLE

28       CURL *curl = curl_easy_init();
29       if(curl) {
30         curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com/file");
31         curl_easy_setopt(curl, CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256,
32                          "NDVkMTQxMGQ1ODdmMjQ3MjczYjAyOTY5MmRkMjVmNDQ=");
33         ret = curl_easy_perform(curl);
34         curl_easy_cleanup(curl);
35       }
36

AVAILABILITY

38       Added in 7.80.0 Requires the libssh2 backend.
39

RETURN VALUE

41       Returns CURLE_OK if the option is  supported,  CURLE_UNKNOWN_OPTION  if
42       not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space.
43

SEE ALSO

45       CURLOPT_SSH_PUBLIC_KEYFILE(3), CURLOPT_SSH_AUTH_TYPES(3),
46
47
48
49libcurl 7.85.0                   May 17, 2C0U2R2LOPT_SSH_HOST_PUBLIC_KEY_SHA256(3)
Impressum