assh/helper_server.h header reference

Description  

This header file provides helper functions designed to ease development of simple ssh2 server applications.

Implementation of server applications may want to reuse and adapt code from this module, as allowed by the license exception covering the source code of this module.

Members  

Functions  

Members detail  

assh_status_t asshh_server_ak_lookup(assh_session_s *s, const char *filename, const assh_key_s *key)  

This function is declared in assh/helper_server.h source file, line 55.

This function looks for a specific key in a pool of authorized user keys.

assh_status_t asshh_server_event_auth(assh_session_s *s, assh_event_s *event)  

This function is declared in assh/helper_server.h source file, line 73.

This function handles the ASSH_EVENT_USERAUTH_SERVER_USERKEY and ASSH_EVENT_USERAUTH_SERVER_PASSWORD events.

The public key authentication is handled by calling the asshh_server_ak_lookup function on the user authorized_keys file.

The password authentication relies on the following libc functions: getpwnam_r, getspnam_r and crypt_r. It requires access to the /etc/shadow file.

This function takes care of calling the assh_event_done function in any case.

assh_status_t asshh_server_event_user_id(assh_session_s *s, uid_t *uid, gid_t *gid, assh_event_s *event)  

This function is declared in assh/helper_server.h source file, line 84.

This retrieves the user id and group id from a ASSH_EVENT_USERAUTH_SERVER_SUCCESS event.

This function takes care of calling the assh_event_done function in any case.

assh_status_t asshh_server_load_hk(assh_context_s *c)  

This function is declared in assh/helper_server.h source file, line 49.

This function loads some host keys from standard locations. The function is successful when at least one key has been loaded.

Valid XHTML 1.0 StrictGenerated by diaxen on Sun Sep 27 13:33:12 2020 using MkDoc