GNURLOPT_S...IC_KEY_MD5(3)
β¨ NAME β¨
Okay so this page is GNURLOPT_S...IC_KEY_MD5(3), from the curl_easy_setopt options manual, and the main-character option is CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 β checksum of SSH server public key. That's literally the whole name, bestie. π
π SYNOPSIS π
Here's the include and the function signature, exactly:
#include <gnurl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSH_HOST_PUBLIC_KEY_MD5,
char *md5);
π DESCRIPTION π
Pass a char * pointing to a string containing 32 hexadecimal digits. The string should be the 128 bit MD5 checksum of the remote host's public key, and libcurl will reject the connection to the host unless the md5sums match. No cap, that's the whole vibe check. πβ¨
The application does not have to keep the string around after setting this option. So you can let it go, bestie β it's not clingy. π¦
πΈ DEFAULT πΈ
NULL β the default is just nothing, empty, no key checksum set. π
π PROTOCOLS π
SCP and SFTP. That's it, that's the list. π«
π EXAMPLE π
Here's the example, copied exactly so you can steal it:
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com/file");
curl_easy_setopt(curl, CURLOPT_SSH_HOST_PUBLIC_KEY_MD5,
"afe17cd62a0f3b61f1ab9cb22ba269a7");
ret = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
β AVAILABILITY β
Added in 7.17.1. Old-school but still iconic. π
π«Ά RETURN VALUE π«Ά
CURLE_OKif the option is supportedCURLE_UNKNOWN_OPTIONif notCURLE_OUT_OF_MEMORYif there was insufficient heap space
π SEE ALSO π
mwah π β this page is from libcurl 7.37.0, dated 19 Jun 2014, and the footer says GNURLOPT_S...IC_KEY_MD5(3). k bye bestie π«Ά
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms