Add libssh2_userauth_authenticated.3, libssh2_userauth_list.3,

libssh2_userauth_password_ex.3 and libssh2_userauth_publickey_fromfile.3
This commit is contained in:
James Housley 2007-06-14 17:15:32 +00:00
parent f71b59c900
commit d4648be5a6
5 changed files with 172 additions and 2 deletions

View File

@ -1,4 +1,4 @@
# $Id: Makefile.am,v 1.22 2007/06/14 16:46:14 jehousley Exp $
# $Id: Makefile.am,v 1.23 2007/06/14 17:15:32 jehousley Exp $
EXTRA_DIST = template.3
@ -54,4 +54,8 @@ dist_man_MANS =
libssh2_sftp_symlink_ex.3 \
libssh2_sftp_tell.3 \
libssh2_sftp_unlink_ex.3 \
libssh2_sftp_write.3
libssh2_sftp_write.3 \
libssh2_userauth_authenticated.3 \
libssh2_userauth_list.3 \
libssh2_userauth_password_ex.3 \
libssh2_userauth_publickey_fromfile.3

View File

@ -0,0 +1,22 @@
.\" $Id: libssh2_userauth_authenticated.3,v 1.1 2007/06/14 17:15:32 jehousley Exp $
.\"
.TH libssh2_userauth_authenticated 3 "1 Jun 2007" "libssh2 0.15" "libssh2 manual"
.SH NAME
libssh2_userauth_authenticated - return authentication status
.SH SYNOPSIS
#include <libssh2.h>
int
libssh2_userauth_authenticated(LIBSSH2_SESSION *session);
.SH DESCRIPTION
\fIsession\fP - Session instance as returned by
.BR libssh2_session_init(3)
Indicates whether or not the named session has been successfully authenticated.
.SH RETURN VALUE
Returns 1 if authenticated and 0 if not.
.SH SEE ALSO
.BR libssh2_session_init(3)

View File

@ -0,0 +1,43 @@
.\" $Id: libssh2_userauth_list.3,v 1.1 2007/06/14 17:15:32 jehousley Exp $
.\"
.TH libssh2_userauth_list 3 "1 Jun 2007" "libssh2 0.15" "libssh2 manual"
.SH NAME
libssh2_userauth_list - list the authentication methods supported by a server
.SH SYNOPSIS
#include <libssh2.h>
char *
libssh2_userauth_list(LIBSSH2_SESSION *session, const char *username, unsigned int username_len);
.SH DESCRIPTION
\fIsession\fP - Session instance as returned by
.BR libssh2_session_init(3)
\fIusername\fP - Username which will be used while authenticating. Note
that most server implementations do not permit attempting authentication
with different usernames between requests. Therefore this must be the
same username you will use on later userauth calls.
\fIusername_len\fP - Length of username parameter.
Send a \fBSSH_USERAUTH_NONE\fP request to the remote host. Unless the
remote host is configured to accept none as a viable authentication
scheme (unlikely), it will return \fBSSH_USERAUTH_FAILURE\fB along with a
listing of what authentication schemes it does support. In the unlikely
event that none authentication succeeds, this method with return NULL. This
case may be distinguished from faily by examining
.BR libssh2_userauth_authenticated(3)
.SH RETURN VALUE
On success a comma delimited list of supported authentication schemes. This list is
internally managed by libssh2. On failure ruturns NULL.
.SH ERRORS
\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
\fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call
.SH SEE ALSO
.BR libssh2_session_init(3)

View File

@ -0,0 +1,50 @@
.\" $Id: libssh2_userauth_password_ex.3,v 1.1 2007/06/14 17:15:32 jehousley Exp $
.\"
.TH libssh2_userauth_password_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2 manual"
.SH NAME
libssh2_userauth_password_ex - authenticate a session with username and password
.SH SYNOPSIS
#include <libssh2.h>
int
libssh2_userauth_password_ex(LIBSSH2_SESSION *session, const char *username, unsigned int username_len, const char *password, unsigned int password_len, LIBSSH2_PASSWD_CHANGEREQ_FUNC((*passwd_change_cb)));
int
libssh2_userauth_password(LIBSSH2_SESSION *session, const char *username, const char *password);
.SH DESCRIPTION
\fIsession\fP - Session instance as returned by
.BR libssh2_session_init(3)
\fIusername\fP - Name of user to attempt plain password authentication for.
\fIusername_len\fP - Length of username parameter.
\fIpassword\fP - Password to use for authenticating username.
\fIpassword_len\fP - Length of password parameter.
\fIpasswd_change_cb\fP - 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.
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.
.SH RETURN VALUE
Return 0 on success or negative on failure. It returns
LIBSSH2_ERROR_EAGAIN when it would otherwise block. While
LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se.
.SH ERRORS
\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
\fILIBSSH2_ERROR_PASSWORD_EXPIRED\fP -
.SH SEE ALSO
.BR libssh2_session_init(3)

View File

@ -0,0 +1,51 @@
.\" $Id: libssh2_userauth_publickey_fromfile.3,v 1.1 2007/06/14 17:15:32 jehousley Exp $
.\"
.TH libssh2_userauth_publickey_fromfile 3 "1 Jun 2007" "libssh2 0.15" "libssh2 manual"
.SH NAME
libssh2_userauth_publickey_fromfile - authenticate a session with a public key, read from a file
.SH SYNOPSIS
#include <libssh2.h>
int
libssh2_userauth_publickey_fromfile_ex(LIBSSH2_SESSION *session, const char *username, unsigned int username_len, const char *publickey, const char *privatekey, const char *passphrase);
int
libssh2_userauth_publickey_fromfile_ex(LIBSSH2_SESSION *session, const char *username, const char *publickey, const char *privatekey, const char *passphrase);
.SH DESCRIPTION
\fIsession\fP - Session instance as returned by
.BR libssh2_session_init(3)
\fIusername\fP - Remote user name to authenticate as.
\fIusername_len\fP - Length of username.
\fIpublickey\fP - Path and name of public key file. (e.g. /etc/ssh/hostkey.pub)
\fIprivatekey\fP - Path and name of private key file. (e.g. /etc/ssh/hostkey)
\fIpassphrase\fP - Passphrase to use when decoding private key file.
Attempt public key authentication using a PEM encoded private key file stored on disk
.SH RETURN VALUE
Return 0 on success or negative on failure. It returns
LIBSSH2_ERROR_EAGAIN when it would otherwise block. While
LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se.
.SH ERRORS
\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP -
\fILIBSSH2_ERROR_PUBLICKEY_UNRECOGNIZED\fP - >The username/public key
combination was invalid.
\fILIBSSH2_ERROR_PUBLICKEY_UNVERIFIED\fP - The username/public key
combination was invalid, or the signature for the supplied public
key was invalid.
.SH SEE ALSO
.BR libssh2_session_init(3)