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.
 
 
 
 

59 lines
2.3 KiB

  1. .TH libssh2_userauth_keyboard_interactive_ex 3 "8 Mar 2008" "libssh2 0.19" "libssh2 manual"
  2. .SH NAME
  3. libssh2_userauth_keyboard_interactive_ex - authenticate a session using
  4. keyboard-interactive authentication
  5. .SH SYNOPSIS
  6. .nf
  7. #include <libssh2.h>
  8. int
  9. libssh2_userauth_keyboard_interactive_ex(LIBSSH2_SESSION *session,
  10. const char *username,
  11. unsigned int username_len,
  12. LIBSSH2_USERAUTH_KBDINT_RESPONSE_FUNC(*response_callback));
  13. .SH DESCRIPTION
  14. \fIsession\fP - Session instance as returned by
  15. \fIlibssh2_session_init_ex(3)\fP.
  16. \fIusername\fP - Name of user to attempt keyboard-interactive authentication
  17. for.
  18. \fIusername_len\fP - Length of username parameter.
  19. \fIresponse_callback\fP - As authentication proceeds, the host issues several
  20. (1 or more) challenges and requires responses. This callback will be called at
  21. this moment. The callback is responsible to obtain responses for the
  22. challenges, fill the provided data structure and then return
  23. control. Responses will be sent to the host. String values will be free(3)ed
  24. by the library. The callback prototype must match this:
  25. .nf
  26. void response(const char *name,
  27. int name_len, const char *instruction,
  28. int instruction_len,
  29. int num_prompts,
  30. const LIBSSH2_USERAUTH_KBDINT_PROMPT *prompts,
  31. LIBSSH2_USERAUTH_KBDINT_RESPONSE *responses,
  32. void **abstract);
  33. .fi
  34. Attempts keyboard-interactive (challenge/response) authentication.
  35. Note that many SSH servers will always issue a single "password" challenge,
  36. requesting actual password as response, but it is not required by the
  37. protocol, and various authentication schemes, such as smartcard authentication
  38. may use keyboard-interactive authentication type too.
  39. .SH RETURN VALUE
  40. Return 0 on success or negative on failure. It returns LIBSSH2_ERROR_EAGAIN
  41. when it would otherwise block. While LIBSSH2_ERROR_EAGAIN is a negative
  42. number, it isn't really a failure per se.
  43. .SH ERRORS
  44. \fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
  45. \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
  46. \fLIBSSH2_ERROR_AUTHENTICATION_FAILED\fP - failed, invalid username/password
  47. or public/private key.
  48. .SH SEE ALSO
  49. .BR libssh2_session_init_ex(3)