1 .TH libssh2_userauth_keyboard_interactive_ex 3 "8 Mar 2008" "libssh2 0.19" "libssh2 manual"
3 libssh2_userauth_keyboard_interactive_ex - authenticate a session using
4 keyboard-interactive authentication
10 libssh2_userauth_keyboard_interactive_ex(LIBSSH2_SESSION *session,
12 unsigned int username_len,
13 LIBSSH2_USERAUTH_KBDINT_RESPONSE_FUNC(*response_callback));
15 \fIsession\fP - Session instance as returned by
16 \fIlibssh2_session_init_ex(3)\fP.
18 \fIusername\fP - Name of user to attempt keyboard-interactive authentication
21 \fIusername_len\fP - Length of username parameter.
23 \fIresponse_callback\fP - As authentication proceeds, the host issues several
24 (1 or more) challenges and requires responses. This callback will be called at
25 this moment. The callback is responsible to obtain responses for the
26 challenges, fill the provided data structure and then return
27 control. Responses will be sent to the host. String values will be free(3)ed
28 by the library. The callback prototype must match this:
31 void response(const char *name,
32 int name_len, const char *instruction,
35 const LIBSSH2_USERAUTH_KBDINT_PROMPT *prompts,
36 LIBSSH2_USERAUTH_KBDINT_RESPONSE *responses,
40 Attempts keyboard-interactive (challenge/response) authentication.
42 Note that many SSH servers will always issue a single "password" challenge,
43 requesting actual password as response, but it is not required by the
44 protocol, and various authentication schemes, such as smartcard authentication
45 may use keyboard-interactive authentication type too.
47 Return 0 on success or negative on failure. It returns LIBSSH2_ERROR_EAGAIN
48 when it would otherwise block. While LIBSSH2_ERROR_EAGAIN is a negative
49 number, it isn't really a failure per se.
51 \fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
53 \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
55 \fLIBSSH2_ERROR_AUTHENTICATION_FAILED\fP - failed, invalid username/password
56 or public/private key.
58 .BR libssh2_session_init_ex(3)