The ssh::Session class contains the state of a SSH connection.  
 More...
#include <include/libssh/libsshpp.hpp>
The ssh::Session class contains the state of a SSH connection. 
◆ acceptForward()
  
  | 
        
          | 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().
 
 
◆ connect()
  
  | 
        
          | void ssh::Session::connect | ( |  | ) |  |  | inline | 
 
 
◆ disconnect()
  
  | 
        
          | void ssh::Session::disconnect | ( |  | ) |  |  | inline | 
 
 
◆ getAuthList()
  
  | 
        
          | int ssh::Session::getAuthList | ( |  | ) |  |  | inline | 
 
 
◆ getDisconnectMessage()
  
  | 
        
          | const char* ssh::Session::getDisconnectMessage | ( |  | ) |  |  | inline | 
 
 
◆ getIssueBanner()
  
  | 
        
          | std::string ssh::Session::getIssueBanner | ( |  | ) |  |  | inline | 
 
 
◆ getOpensshVersion()
  
  | 
        
          | int ssh::Session::getOpensshVersion | ( |  | ) |  |  | inline | 
 
 
◆ getSocket()
  
  | 
        
          | 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().
 
 
◆ getVersion()
  
  | 
        
          | int ssh::Session::getVersion | ( |  | ) |  |  | inline | 
 
 
◆ isServerKnown()
  
  | 
        
          | int ssh::Session::isServerKnown | ( |  | ) |  |  | inline | 
 
 
◆ optionsCopy()
  
  | 
        
          | void ssh::Session::optionsCopy | ( | const Session & | source | ) |  |  | inline | 
 
 
◆ optionsParseConfig()
  
  | 
        
          | void ssh::Session::optionsParseConfig | ( | const char * | file | ) |  |  | inline | 
 
 
◆ setOption() [1/3]
  
  | 
        
          | 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().
 
 
◆ setOption() [2/3]
  
  | 
        
          | 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().
 
 
◆ setOption() [3/3]
  
  | 
        
          | 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().
 
 
◆ silentDisconnect()
  
  | 
        
          | void ssh::Session::silentDisconnect | ( |  | ) |  |  | inline | 
 
 
◆ userauthNone()
  
  | 
        
          | 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().
 
 
◆ userauthPassword()
  
  | 
        
          | 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().
 
 
◆ userauthPublickey()
  
  | 
        
          | 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().
 
 
◆ userauthPublickeyAuto()
  
  | 
        
          | 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().
 
 
◆ userauthTryPublickey()
  
  | 
        
          | 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().
 
 
◆ writeKnownhost()
  
  | 
        
          | int ssh::Session::writeKnownhost | ( |  | ) |  |  | inline | 
 
 
The documentation for this class was generated from the following file: