The ssh::Session class contains the state of a SSH connection.
More...
#include <libssh/libsshpp.hpp>
The ssh::Session class contains the state of a SSH connection.
Channel * ssh::Session::acceptForward |
( |
int |
timeout_ms | ) |
|
|
inline |
accept an incoming forward connection
- Parameters
-
[in] | timeout_ms | timeout for waiting, in ms |
- Returns
- new Channel pointer on the forward connection
-
NULL in case of error
- Warning
- you have to delete this pointer after use
- See also
- ssh_channel_forward_accept
-
Session::listenForward
References ssh_channel_accept_forward().
void ssh::Session::connect |
( |
| ) |
|
|
inline |
void ssh::Session::disconnect |
( |
| ) |
|
|
inline |
int ssh::Session::getAuthList |
( |
| ) |
|
|
inline |
const char* ssh::Session::getDisconnectMessage |
( |
| ) |
|
|
inline |
Returns the disconnect message from the server, if any.
- Returns
- pointer to the message, or NULL. Do not attempt to free the pointer.
References ssh_get_disconnect_message().
std::string ssh::Session::getIssueBanner |
( |
| ) |
|
|
inline |
int ssh::Session::getOpensshVersion |
( |
| ) |
|
|
inline |
socket_t ssh::Session::getSocket |
( |
| ) |
|
|
inline |
returns the file descriptor used for the communication
- Returns
- the file descriptor
- Warning
- if a proxycommand is used, this function will only return one of the two file descriptors being used
- See also
- ssh_get_fd
References ssh_get_fd().
int ssh::Session::getVersion |
( |
| ) |
|
|
inline |
int ssh::Session::isServerKnown |
( |
| ) |
|
|
inline |
void ssh::Session::optionsCopy |
( |
const Session & |
source | ) |
|
|
inline |
void ssh::Session::optionsParseConfig |
( |
const char * |
file | ) |
|
|
inline |
void ssh::Session::setOption |
( |
enum ssh_options_e |
type, |
|
|
const char * |
option |
|
) |
| |
|
inline |
sets an SSH session options
- Parameters
-
type | Type of option |
option | cstring containing the value of option |
- Exceptions
-
- See also
- ssh_options_set
References ssh_options_set().
void ssh::Session::setOption |
( |
enum ssh_options_e |
type, |
|
|
long int |
option |
|
) |
| |
|
inline |
sets an SSH session options
- Parameters
-
type | Type of option |
option | long integer containing the value of option |
- Exceptions
-
- See also
- ssh_options_set
References ssh_options_set().
void ssh::Session::setOption |
( |
enum ssh_options_e |
type, |
|
|
void * |
option |
|
) |
| |
|
inline |
sets an SSH session options
- Parameters
-
type | Type of option |
option | void pointer containing the value of option |
- Exceptions
-
- See also
- ssh_options_set
References ssh_options_set().
void ssh::Session::silentDisconnect |
( |
| ) |
|
|
inline |
int ssh::Session::userauthNone |
( |
| ) |
|
|
inline |
Authenticates using the "none" method.
Prefer using autopubkey if possible.
- Exceptions
-
- Returns
- SSH_AUTH_SUCCESS, SSH_AUTH_PARTIAL, SSH_AUTH_DENIED
- See also
- ssh_userauth_none
-
Session::userauthAutoPubkey
References ssh_userauth_none().
int ssh::Session::userauthPassword |
( |
const char * |
password | ) |
|
|
inline |
Authenticates using the password method.
- Parameters
-
[in] | password | password to use for authentication |
- Exceptions
-
- Returns
- SSH_AUTH_SUCCESS, SSH_AUTH_PARTIAL, SSH_AUTH_DENIED
- See also
- ssh_userauth_password
References ssh_userauth_password().
int ssh::Session::userauthPublickey |
( |
ssh_key |
privkey | ) |
|
|
inline |
Authenticates using the publickey method.
- Parameters
-
[in] | privkey | private key to use for authentication |
- Exceptions
-
- Returns
- SSH_AUTH_SUCCESS, SSH_AUTH_PARTIAL, SSH_AUTH_DENIED
- See also
- ssh_userauth_pubkey
References ssh_userauth_publickey().
int ssh::Session::userauthPublickeyAuto |
( |
void |
| ) |
|
|
inline |
Authenticates automatically using public key.
- Exceptions
-
- Returns
- SSH_AUTH_SUCCESS, SSH_AUTH_PARTIAL, SSH_AUTH_DENIED
- See also
- ssh_userauth_autopubkey
References ssh_userauth_publickey_auto().
int ssh::Session::userauthTryPublickey |
( |
ssh_key |
pubkey | ) |
|
|
inline |
Try to authenticate using the publickey method.
- Parameters
-
[in] | pubkey | public key to use for authentication |
- Exceptions
-
- Returns
- SSH_AUTH_SUCCESS if the pubkey is accepted,
-
SSH_AUTH_DENIED if the pubkey is denied
- See also
- ssh_userauth_try_pubkey
References ssh_userauth_try_publickey().
int ssh::Session::writeKnownhost |
( |
| ) |
|
|
inline |
The documentation for this class was generated from the following file:
- /Users/Rand0m/Desktop/Temp/CodeLitePrj/libssh-0.7.0/include/libssh/libsshpp.hpp