1libssh2_userauth_password_ex(3) libssh2 manual libssh2_userauth_password_ex(3)
2
3
4
6 libssh2_userauth_password_ex - authenticate a session with username and
7 password
8
10 #include <libssh2.h>
11
12 int libssh2_userauth_password_ex(LIBSSH2_SESSION *session, const char
13 *username, unsigned int username_len, const char *password, unsigned
14 int password_len, LIBSSH2_PASSWD_CHANGEREQ_FUNC((*passwd_change_cb)));
15
16 int libssh2_userauth_password(LIBSSH2_SESSION *session, const char
17 *username, const char *password);
18
19
21 session - Session instance as returned by libssh2_session_init_ex(3)
22
23 username - Name of user to attempt plain password authentication for.
24
25 username_len - Length of username parameter.
26
27 password - Password to use for authenticating username.
28
29 password_len - Length of password parameter.
30
31 passwd_change_cb - If the host accepts authentication but requests that
32 the password be changed, this callback will be issued. If no callback
33 is defined, but server required password change, authentication will
34 fail.
35
36 Attempt basic password authentication. Note that many SSH servers which
37 appear to support ordinary password authentication actually have it
38 disabled and use Keyboard Interactive authentication (routed via PAM or
39 another authentication backed) instead.
40
41
43 Return 0 on success or negative on failure. It returns LIB‐
44 SSH2_ERROR_EAGAIN when it would otherwise block. While LIB‐
45 SSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per
46 se.
47
48
50 LIBSSH2_ERROR_ALLOC - An internal memory allocation call failed.
51
52 LIBSSH2_ERROR_SOCKET_SEND - Unable to send data on socket.
53
54 LIBSSH2_ERROR_PASSWORD_EXPIRED -
55
56 IBSSH2_ERROR_AUTHENTICATION_FAILED - failed, invalid username/password
57 or public/private key.
58
59
61 libssh2_session_init_ex(3)
62
63
64
65libssh2 0.15 1 Jun 2007 libssh2_userauth_password_ex(3)