1libssh2_userauth_password_ex(3)     libssh2    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
12       int
13       libssh2_userauth_password_ex(LIBSSH2_SESSION *session,
14                                    const char *username,
15                                    unsigned int username_len,
16                                    const char *password,
17                                    unsigned int password_len,
18                                  LIBSSH2_PASSWD_CHANGEREQ_FUNC((*passwd_change_cb)));
19
20       #define libssh2_userauth_password(session, username, password) \
21            libssh2_userauth_password_ex((session), (username), \
22                                         strlen(username), \
23                                         (password), strlen(password), NULL)
24

DESCRIPTION

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

RETURN VALUE

47       Return 0 on success or negative on  failure.   It  returns  LIBSSH2_ER‐
48       ROR_EAGAIN when it would otherwise block. While LIBSSH2_ERROR_EAGAIN is
49       a negative number, it is not really a failure per se.
50

ERRORS

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

SEE ALSO

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