libnetconf  0.10.0-146_trunk
NETCONF Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
callbacks_ssh.h
Go to the documentation of this file.
1 
40 #ifndef NC_CALLBACKS_SSH_H_
41 #define NC_CALLBACKS_SSH_H_
42 
43 #ifndef DISABLE_LIBSSH
44 
45 #include <libssh/libssh.h>
46 
47 #include "netconf.h"
48 
49 #ifdef __cplusplus
50 extern "C" {
51 #endif
52 
64 void nc_callback_sshauth_interactive(char* (*func)(const char* name,
65  const char* instruction,
66  const char* prompt,
67  int echo));
68 
81 void nc_callback_sshauth_password(char* (*func)(const char* username,
82  const char* hostname));
83 
95 void nc_callback_sshauth_passphrase(char* (*func)(const char* username,
96  const char* hostname, const char* priv_key_file));
97 
110 void nc_callback_ssh_host_authenticity_check(int (*func)(const char* hostname,
111  ssh_session session));
112 
125 int nc_set_keypair_path(const char* privkey, const char* pubkey);
126 
138 int nc_del_keypair_path(const char* privkey, const char* pubkey);
139 
140 #ifdef __cplusplus
141 }
142 #endif
143 
144 #endif /* DISABLE_LIBSSH */
145 
146 #endif /* NC_CALLBACKS_SSH_H_ */
void nc_callback_sshauth_interactive(char *(*func)(const char *name, const char *instruction, const char *prompt, int echo))
Set a callback function for passing user credentials into the libssh's keyboard-interactive authentic...
void nc_callback_sshauth_passphrase(char *(*func)(const char *username, const char *hostname, const char *priv_key_file))
Set a callback function for passing the user password into the libssh's publickey authentication meth...
int nc_set_keypair_path(const char *privkey, const char *pubkey)
Set path to a private and a public key file used in case of SSH authentication via a publickey mechan...
void nc_callback_ssh_host_authenticity_check(int(*func)(const char *hostname, ssh_session session))
Set a callback function to authorize authenticity of the remote host.
void nc_callback_sshauth_password(char *(*func)(const char *username, const char *hostname))
Set a callback function for passing the user password into the libssh's password authentication metho...
libnetconf's general public functions and structures definitions.
int nc_del_keypair_path(const char *privkey, const char *pubkey)
Remove a private and a public key file.