CURL.SetOptionSSHHostPublicKeySHA256
------------------------------------

Sets the SHA256 hash of SSH server public key.

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

MBS( "CURL.SetOptionSSHHostPublicKeySHA256"; curl; Value ) 

**MBS**( **"CURL.SetOptionSSHHostPublicKeySHA256";** /\* Sets the SHA256 hash of SSH server public key. \*/  
**$curl**; /\* The CURL session handle. \*/   
**$Value**) /\* The new host key. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| curl | The CURL session handle. | $curl |
| Value | The new host key. |  |

### Result

Returns OK or error.

### Description

Sets the SHA256 hash of SSH server public key.  
Pass a string containing a Base64-encoded SHA256 hash of the remote host's public key. The transfer will fail if the given hash does not match the hash the remote host provides.  
See also [SSH\_HOST\_PUBLIC\_KEY\_SHA256](https://curl.haxx.se/libcurl/c/CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256.html) option in CURL manual.

### See also

- [CURL.SetOptionSSHHostPublicKeyMD5](CURLSetOptionSSHHostPublicKeyMD5.md)

### Release notes

- **Version 12.4**
    - Added [CURL.SetOptionMaxLifeTimeConnection](https://www.mbsplugins.eu/CURLSetOptionMaxLifeTimeConnection.shtml), [CURL.SetOptionMimeOptions](https://www.mbsplugins.eu/CURLSetOptionMimeOptions.shtml) and [CURL.SetOptionSSHHostPublicKeySHA256](https://www.mbsplugins.eu/CURLSetOptionSSHHostPublicKeySHA256.shtml) functions.

### Blog Entries

- [MBS FileMaker Plugin 12.4](https://www.mbsplugins.de/archive/2022-09-27/MBS_FileMaker_Plugin_124/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 12.4pr3](https://www.mbsplugins.de/archive/2022-08-24/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

Created 22nd August 2022 , last changed 22nd August 2022

  
[CURL.SetOptionSSHHostPublicKeyMD5](CURLSetOptionSSHHostPublicKeyMD5.md) - [CURL.SetOptionSSHKnownHosts](CURLSetOptionSSHKnownHosts.md)

[HTML Version](CURLSetOptionSSHHostPublicKeySHA256.shtml)