Libssh2 userauth password ex
From Libssh2
int libssh2_userauth_password_ex(LIBSSH2_SESSION *session,
const char *username, int username_len,
const char *password, int password_len,
LIBSSH2_PASSWD_CHANGEREQ_FUNC((*passwd_change_cb)));
#define libssh2_userauth_password(session, username, password) \
libssh2_userauth_password_ex((session), (username), strlen(username), \
(password), strlen(password), NULL)
[edit]
About
Attempt basic password authentication. Note that many SSH servers which appear to support ordinary password authentication actually have it disabled and use Keyboard Interactive authentication (routed via PAM or another authentication backed) instead.
[edit]
Parameters
- session
- Session instance as returned by libssh2_session_init().
- username
- Name of user to attempt plain password authentication for.
- username_len
- Length of username parameter.
- password
- Password to use for authenticating username.
- password_len
- Length of password parameter.
- passwd_change_cb
- If the host accepts authentication but requests that the password be changed, this callback will be issued. If no callback is defined, but server required password change, authentication will fail.
[edit]
Returns
- On Success: 0
- On Failure: -1
