CURL.SetOptionSSHHostPublicKeyMD5
---------------------------------

Sets MD5 hash for public key.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [CURL](component_CURL.md) | [2.5](newinversion25.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "CURL.SetOptionSSHHostPublicKeyMD5"; curl; Value { ; Encoding } ) 

**MBS**( **"CURL.SetOptionSSHHostPublicKeyMD5";** /\* Sets MD5 hash for public key. \*/  
**$curl**; /\* The CURL session handle. \*/   
**$Value**; /\* The new MD5 hash.e.g. "8B1A9953C4611296A827ABF8C47804D7" \*/   
**$Encoding**) /\* Optional; The text encoding for text parameter.   
Default is UTF-8.e.g. "UTF8" \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| curl | The CURL session handle. | $curl |  |
| Value | The new MD5 hash. | "8B1A9953C4611296A827ABF8C47804D7" |  |
| Encoding | The text encoding for text parameter.    Default is UTF-8.   Possible encoding names: ANSI, ISO-8859-1, Latin1, Mac, Native, UTF-8, DOS, Hex, Base64 or Windows. More listed in the [FAQ](https://www.monkeybreadsoftware.com/filemaker/faq.shtml). | "UTF8" | Optional |

### Result

Returns "OK" on success.

### Description

Sets MD5 hash for public key.  
Pass 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. This option is only for SCP and SFTP transfers.  
See also [SSH\_HOST\_PUBLIC\_KEY\_MD5](https://curl.haxx.se/libcurl/c/CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.html) option in CURL manual.

### See also

- [CURL.SetOptionSSHHostPublicKeySHA256](CURLSetOptionSSHHostPublicKeySHA256.md)
- [CURL.SetOptionSSHPublicKeyfile](CURLSetOptionSSHPublicKeyfile.md)

Created 18th August 2014 , last changed 5th July 2015

  
[CURL.SetOptionSSHCompression](CURLSetOptionSSHCompression.md) - [CURL.SetOptionSSHHostPublicKeySHA256](CURLSetOptionSSHHostPublicKeySHA256.md)

[HTML Version](CURLSetOptionSSHHostPublicKeyMD5.shtml)