libssh  0.8.3
The SSH library
Modules | Functions
The libssh API
Collaboration diagram for The libssh API:

Modules

 The libssh callbacks
 
 The SSH authentication functions.
 
 The SSH buffer functions.
 
 The SSH channel functions
 
 The SSH error functions.
 
 The SSH logging functions.
 
 The SSH message functions
 
 The SSH helper functions.
 
 The SSH Public Key Infrastructure
 
 The SSH poll functions.
 
 The SSH scp functions
 
 The SSH session functions.
 
 The SSH string functions
 String manipulations used in libssh.
 
 The SSH threading functions.
 

Functions

int ssh_init (void)
 Initialize global cryptographic data structures. More...
 
void libssh_destructor (void)
 Finalize and cleanup all libssh and cryptographic data structures. More...
 
int ssh_finalize (void)
 Finalize and cleanup all libssh and cryptographic data structures. More...
 

Detailed Description

The libssh library is implementing the SSH protocols and some of its extensions. This group of functions is mostly used to implement an SSH client. Some function are needed to implement an SSH server too.

Function Documentation

◆ libssh_destructor()

void libssh_destructor ( void  )

Finalize and cleanup all libssh and cryptographic data structures.

This function is automatically called when the library is unloaded.

Returns
0 on succes, -1 if an error occured.

◆ ssh_finalize()

int ssh_finalize ( void  )

Finalize and cleanup all libssh and cryptographic data structures.

Since version 0.8.0, it is not necessary to call this function, since it is automatically called when the library is unloaded.

If ssh_init() is called explicitly, then ssh_finalize() must be called explicitly.

When called, decrements the counter _ssh_initialized. If the counter reaches zero, then the libssh and cryptographic data structures are cleaned up.

Returns
0 on succes, -1 if an error occured.
0 otherwise

◆ ssh_init()

int ssh_init ( void  )

Initialize global cryptographic data structures.

Since version 0.8.0, it is not necessary to call this function on systems which are fully supported with regards to threading (that is, system with pthreads available).

If the library is already initialized, increments the _ssh_initialized counter and return the error code cached in _ssh_init_ret.

Returns
0 on success, -1 if an error occured.