1#ifndef joedb_ssh_Session_declared
2#define joedb_ssh_Session_declared
28 ssh_session
get()
const
57 ssh_options_set(
session, SSH_OPTIONS_HOST, host);
58 ssh_options_set(
session, SSH_OPTIONS_USER, user);
59 ssh_options_set(
session, SSH_OPTIONS_PORT, &port);
60 ssh_options_set(
session, SSH_OPTIONS_LOG_VERBOSITY, &verbosity);
63 const int no_delay = 1;
64 ssh_options_set(
session, SSH_OPTIONS_NODELAY, &no_delay);
84 Imported_Key(
const char *b64_key,
const char *passphrase): key(nullptr)
86 ssh_pki_import_privkey_base64
96 throw Exception(
"Could not import private key");
120 const std::string &user,
121 const std::string &host,
124 const char *
const b64_key =
nullptr,
125 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)
void check_not_null(void *p)
void check_ssh_session_result(ssh_session session, int result)