geom_gate userland utility improvements
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

58 lines
2.1 KiB

  1. .TH libssh2_userauth_password_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2 manual"
  2. .SH NAME
  3. libssh2_userauth_password_ex - authenticate a session with username and password
  4. .SH SYNOPSIS
  5. #include <libssh2.h>
  6. .nf
  7. int libssh2_userauth_password_ex(LIBSSH2_SESSION *session,
  8. const char *username,
  9. unsigned int username_len,
  10. const char *password,
  11. unsigned int password_len,
  12. LIBSSH2_PASSWD_CHANGEREQ_FUNC((*passwd_change_cb)));
  13. #define libssh2_userauth_password(session, username, password) \\
  14. libssh2_userauth_password_ex((session), (username), \\
  15. strlen(username), \\
  16. (password), strlen(password), NULL)
  17. .SH DESCRIPTION
  18. \fIsession\fP - Session instance as returned by
  19. .BR libssh2_session_init_ex(3)
  20. \fIusername\fP - Name of user to attempt plain password authentication for.
  21. \fIusername_len\fP - Length of username parameter.
  22. \fIpassword\fP - Password to use for authenticating username.
  23. \fIpassword_len\fP - Length of password parameter.
  24. \fIpasswd_change_cb\fP - If the host accepts authentication but
  25. requests that the password be changed, this callback will be issued.
  26. If no callback is defined, but server required password change,
  27. authentication will fail.
  28. Attempt basic password authentication. Note that many SSH servers
  29. which appear to support ordinary password authentication actually have
  30. it disabled and use Keyboard Interactive authentication (routed via
  31. PAM or another authentication backed) instead.
  32. .SH RETURN VALUE
  33. Return 0 on success or negative on failure. It returns
  34. LIBSSH2_ERROR_EAGAIN when it would otherwise block. While
  35. LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se.
  36. .SH ERRORS
  37. Some of the errors this function may return include:
  38. \fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
  39. \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
  40. \fILIBSSH2_ERROR_PASSWORD_EXPIRED\fP -
  41. \fLIBSSH2_ERROR_AUTHENTICATION_FAILED\fP - failed, invalid username/password
  42. or public/private key.
  43. .SH SEE ALSO
  44. .BR libssh2_session_init_ex(3)