libssh
0.6.3
|
The ssh::Session class contains the state of a SSH connection. More...
#include <include/libssh/libsshpp.hpp>
Public Member Functions | |
Channel * | acceptForward (int timeout_ms) |
accept an incoming forward connection | |
void | connect () |
connects to the remote host | |
void | disconnect () |
Disconnects from the SSH server and closes connection. | |
int | getAuthList () |
Returns the available authentication methods from the server. | |
const char * | getDisconnectMessage () |
Returns the disconnect message from the server, if any. | |
std::string | getIssueBanner () |
gets the Issue banner from the ssh server | |
int | getOpensshVersion () |
returns the OpenSSH version (server) if possible | |
socket_t | getSocket () |
returns the file descriptor used for the communication | |
int | getVersion () |
returns the version of the SSH protocol being used | |
int | isServerKnown () |
verifies that the server is known | |
void | optionsCopy (const Session &source) |
copies options from a session to another | |
void | optionsParseConfig (const char *file) |
parses a configuration file for options | |
void | setOption (enum ssh_options_e type, const char *option) |
sets an SSH session options | |
void | setOption (enum ssh_options_e type, long int option) |
sets an SSH session options | |
void | setOption (enum ssh_options_e type, void *option) |
sets an SSH session options | |
void | silentDisconnect () |
silently disconnect from remote host | |
int | userauthNone () |
Authenticates using the "none" method. | |
int | userauthPassword (const char *password) |
Authenticates using the password method. | |
int | userauthPublickey (ssh_key privkey) |
Authenticates using the publickey method. | |
int | userauthPublickeyAuto (void) |
Authenticates automatically using public key. | |
int | userauthTryPublickey (ssh_key pubkey) |
Try to authenticate using the publickey method. | |
int | writeKnownhost () |
Writes the known host file with current host key. |
The ssh::Session class contains the state of a SSH connection.
Channel * ssh::Session::acceptForward | ( | int | timeout_ms | ) |
accept an incoming forward connection
[in] | timeout_ms | timeout for waiting, in ms |
References ssh_forward_accept().
|
inline |
connects to the remote host
SshException | on error |
References ssh_connect().
|
inline |
Disconnects from the SSH server and closes connection.
References ssh_disconnect().
|
inline |
Returns the available authentication methods from the server.
SshException | on error |
References ssh_userauth_list().
|
inline |
Returns the disconnect message from the server, if any.
References ssh_get_disconnect_message().
|
inline |
gets the Issue banner from the ssh server
References ssh_get_issue_banner().
|
inline |
returns the OpenSSH version (server) if possible
References ssh_get_openssh_version().
|
inline |
returns the file descriptor used for the communication
References ssh_get_fd().
|
inline |
returns the version of the SSH protocol being used
References ssh_get_version().
|
inline |
verifies that the server is known
SshException | on error |
References ssh_is_server_known().
|
inline |
copies options from a session to another
SshException | on error |
References ssh_options_copy().
|
inline |
parses a configuration file for options
SshException | on error |
[in] | file | configuration file name |
References ssh_options_parse_config().
|
inline |
sets an SSH session options
type | Type of option |
option | cstring containing the value of option |
SshException | on error |
References ssh_options_set().
|
inline |
sets an SSH session options
type | Type of option |
option | long integer containing the value of option |
SshException | on error |
References ssh_options_set().
|
inline |
sets an SSH session options
type | Type of option |
option | void pointer containing the value of option |
SshException | on error |
References ssh_options_set().
|
inline |
silently disconnect from remote host
References ssh_silent_disconnect().
|
inline |
Authenticates using the "none" method.
Prefer using autopubkey if possible.
SshException | on error |
References ssh_userauth_none().
|
inline |
Authenticates using the password method.
[in] | password | password to use for authentication |
SshException | on error |
References ssh_userauth_password().
|
inline |
Authenticates using the publickey method.
[in] | privkey | private key to use for authentication |
SshException | on error |
References ssh_userauth_publickey().
|
inline |
Authenticates automatically using public key.
SshException | on error |
References ssh_userauth_publickey_auto().
|
inline |
Try to authenticate using the publickey method.
[in] | pubkey | public key to use for authentication |
SshException | on error |
References ssh_userauth_try_publickey().
|
inline |
Writes the known host file with current host key.
SshException | on error |
References ssh_write_knownhost().