1
.\" Copyright (C) The libssh2 project and its contributors.
2
.\" SPDX-License-Identifier: BSD-3-Clause
3
.TH libssh2_userauth_list 3 "1 Jun 2007" "libssh2 0.15" "libssh2"
5
libssh2_userauth_list - list supported authentication methods
11
libssh2_userauth_list(LIBSSH2_SESSION *session,
13
unsigned int username_len);
16
\fIsession\fP - Session instance as returned by
17
.BR libssh2_session_init_ex(3)
19
\fIusername\fP - Username which will be used while authenticating. Note that
20
most server implementations do not permit attempting authentication with
21
different usernames between requests. Therefore this must be the same username
22
you will use on later userauth calls.
24
\fIusername_len\fP - Length of username parameter.
26
Send a \fBSSH_USERAUTH_NONE\fP 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 \fBSSH_USERAUTH_FAILURE\fP along with a listing of
29
what authentication schemes it does support. In the unlikely event that none
30
authentication succeeds, this method with return NULL. This case may be
31
distinguished from a failing case by examining
32
\fIlibssh2_userauth_authenticated(3)\fP.
34
On success a comma delimited list of supported authentication schemes. This
35
list is internally managed by libssh2. On failure returns NULL.
37
\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
39
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
41
\fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call
43
.BR libssh2_session_init_ex(3)