1#ifndef joedb_ssh_Session_declared
2#define joedb_ssh_Session_declared
7#include <libssh/libssh.h>
29 ssh_session
get()
const
59 ssh_options_set(
session, SSH_OPTIONS_HOST, host);
60 ssh_options_set(
session, SSH_OPTIONS_USER, user);
61 ssh_options_set(
session, SSH_OPTIONS_PORT, &port);
62 ssh_options_set(
session, SSH_OPTIONS_LOG_VERBOSITY, &verbosity);
65 const int no_delay = 1;
66 ssh_options_set(
session, SSH_OPTIONS_NODELAY, &no_delay);
86 Imported_Key(
const char *b64_key,
const char *passphrase): key(nullptr)
88 ssh_pki_import_privkey_base64
121 const std::string &user,
122 const std::string &host,
125 const char *
const b64_key =
nullptr,
126 const char *
const passphrase =
nullptr
Imported_Key(const char *b64_key, const char *passphrase)
Imported_Key & operator=(const Imported_Key &)=delete
Imported_Key(const Imported_Key &)=delete
const ssh_session session
void check_result(int result) const
Session_Allocation & operator=(const Session_Allocation &)=delete
Session_Allocation(const Session_Allocation &)=delete
Session_Connection(const char *user, const char *host, unsigned port, int verbosity)
Session(const std::string &user, const std::string &host, const unsigned port, const int verbosity, const char *const b64_key=nullptr, const char *const passphrase=nullptr)
#define JOEDB_RELEASE_ASSERT(x)