1libssh2_userauth_list(3) libssh2 libssh2_userauth_list(3)
2
3
4
6 libssh2_userauth_list - list supported authentication methods
7
9 #include <libssh2.h>
10
11 char *
12 libssh2_userauth_list(LIBSSH2_SESSION *session,
13 const char *username,
14 unsigned int username_len);
15
17 session - Session instance as returned by libssh2_session_init_ex(3)
18
19 username - Username which will be used while authenticating. Note that
20 most server implementations do not permit attempting authentication
21 with different usernames between requests. Therefore this must be the
22 same username you will use on later userauth calls.
23
24 username_len - Length of username parameter.
25
26 Send a SSH_USERAUTH_NONE request to the remote host. Unless the remote
27 host is configured to accept none as a viable authentication scheme
28 (unlikely), it will return SSH_USERAUTH_FAILURE along with a listing of
29 what authentication schemes it does support. In the unlikely event that
30 none authentication succeeds, this method with return NULL. This case
31 may be distinguished from a failing case by examining libssh2_user‐
32 auth_authenticated(3).
33
35 On success a comma delimited list of supported authentication schemes.
36 This list is internally managed by libssh2. On failure returns NULL.
37
39 LIBSSH2_ERROR_ALLOC - An internal memory allocation call failed.
40
41 LIBSSH2_ERROR_SOCKET_SEND - Unable to send data on socket.
42
43 LIBSSH2_ERROR_EAGAIN - Marked for non-blocking I/O but the call
44
46 libssh2_session_init_ex(3)
47
48
49
50libssh2 0.15 1 Jun 2007 libssh2_userauth_list(3)