1libssh2_userauth_password_ex(3) libssh2 manual libssh2_userauth_password_ex(3)
2
3
4

NAME

6       libssh2_userauth_password_ex - authenticate a session with username and
7       password
8

SYNOPSIS

10       #include <libssh2.h>
11       int libssh2_userauth_password_ex(LIBSSH2_SESSION *session,
12                           const char *username,
13                           unsigned int username_len,
14                           const char *password,
15                           unsigned int password_len,
16                           LIBSSH2_PASSWD_CHANGEREQ_FUNC((*passwd_change_cb)));
17
18       #define libssh2_userauth_password(session, username, password) \
19        libssh2_userauth_password_ex((session), (username), \
20                                     strlen(username), \
21                                     (password), strlen(password), NULL)
22

DESCRIPTION

24       session - Session instance as returned by libssh2_session_init_ex(3)
25
26       username - Name of user to attempt plain password authentication for.
27
28       username_len - Length of username parameter.
29
30       password - Password to use for authenticating username.
31
32       password_len - Length of password parameter.
33
34       passwd_change_cb - If the host accepts authentication but requests that
35       the  password be changed, this callback will be issued.  If no callback
36       is defined, but server required password  change,  authentication  will
37       fail.
38
39       Attempt basic password authentication. Note that many SSH servers which
40       appear to support ordinary password  authentication  actually  have  it
41       disabled and use Keyboard Interactive authentication (routed via PAM or
42       another authentication backed) instead.
43
44

RETURN VALUE

46       Return  0  on  success  or  negative  on  failure.   It  returns   LIB‐
47       SSH2_ERROR_EAGAIN   when   it   would   otherwise   block.  While  LIB‐
48       SSH2_ERROR_EAGAIN is a negative number, it isn't really a  failure  per
49       se.
50
51

ERRORS

53       Some of the errors this function may return include:
54
55       LIBSSH2_ERROR_ALLOC -  An internal memory allocation call failed.
56
57       LIBSSH2_ERROR_SOCKET_SEND - Unable to send data on socket.
58
59       LIBSSH2_ERROR_PASSWORD_EXPIRED -
60
61       IBSSH2_ERROR_AUTHENTICATION_FAILED  - failed, invalid username/password
62       or public/private key.
63

SEE ALSO

65       libssh2_session_init_ex(3)
66
67
68
69libssh2 0.15                      1 Jun 2007   libssh2_userauth_password_ex(3)
Impressum