#include <libssh/libssh.h>
#if !defined(HAVE_SSH_OPTIONS_KEY_EXCHANGE) && !defined(HAVE_SSH_OPTIONS_HOSTKEYS) && \
!defined(HAVE_SSH_OPTIONS_CIPHERS_C_S) && !defined(HAVE_SSH_OPTIONS_CIPHERS_S_C) && \
!defined(HAVE_SSH_OPTIONS_HMAC_C_S) && !defined(HAVE_SSH_OPTIONS_HMAC_S_C) && \
!defined(HAVE_SSH_OPTIONS_PUBLICKEY_ACCEPTED_TYPES)
#define HAVE_NO_SSH_OPTIONS 1
#define DATA_BUFFER_SIZE 4096
#ifndef HAVE_NO_SSH_OPTIONS
static int ssh_set_options(ssh_session session, enum ssh_options_e type, const char *key_str, const char *value,
zabbix_log(LOG_LEVEL_DEBUG, "In %s() key_str:'%s' value:'%s'", __func__, key_str, value);
if (0 > ssh_options_set(session, type, value))
*err_msg = zbx_dsprintf(NULL, "Cannot set SSH option \"%s\": %s.", key_str, ssh_get_error(session));
zabbix_log(LOG_LEVEL_DEBUG, "End of %s():%s", __func__, zbx_result_string(ret));
static int ssh_parse_options(ssh_session session, const char *options, char **err_msg)
char opt_copy[1024] = {0};
zbx_strscpy(opt_copy, options);
for (line = strtok_r(opt_copy, ";", &saveptr); NULL != line; line = strtok_r(NULL, ";", &saveptr))