Building the libssh2 and including a script to build it as UB
[printdrop.git] / libssh2 / share / man / man3 / libssh2_userauth_publickey_fromfile.3
1 .\" $Id: libssh2_userauth_publickey_fromfile.3,v 1.1 2007/06/14 17:15:32 jehousley Exp $
2 .\"
3 .TH libssh2_userauth_publickey_fromfile 3 "1 Jun 2007" "libssh2 0.15" "libssh2 manual"
4 .SH NAME
5 libssh2_userauth_publickey_fromfile - authenticate a session with a public key, read from a file
6 .SH SYNOPSIS
7 #include <libssh2.h>
8
9 int
10 libssh2_userauth_publickey_fromfile_ex(LIBSSH2_SESSION *session, const char *username, unsigned int username_len, const char *publickey, const char *privatekey, const char *passphrase);
11
12 int
13 libssh2_userauth_publickey_fromfile_ex(LIBSSH2_SESSION *session, const char *username, const char *publickey, const char *privatekey, const char *passphrase);
14
15 .SH DESCRIPTION
16 \fIsession\fP - Session instance as returned by
17 .BR libssh2_session_init(3)
18
19 \fIusername\fP - Remote user name to authenticate as.
20
21 \fIusername_len\fP - Length of username.
22
23 \fIpublickey\fP - Path and name of public key file. (e.g. /etc/ssh/hostkey.pub)
24
25 \fIprivatekey\fP - Path and name of private key file. (e.g. /etc/ssh/hostkey)
26
27 \fIpassphrase\fP - Passphrase to use when decoding private key file.
28
29 Attempt public key authentication using a PEM encoded private key file stored on disk
30
31 .SH RETURN VALUE
32 Return 0 on success or negative on failure. It returns
33 LIBSSH2_ERROR_EAGAIN when it would otherwise block. While
34 LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se.
35
36 .SH ERRORS
37 \fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
38
39 \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
40
41 \fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP -
42
43 \fILIBSSH2_ERROR_PUBLICKEY_UNRECOGNIZED\fP - >The username/public key
44 combination was invalid.
45
46 \fILIBSSH2_ERROR_PUBLICKEY_UNVERIFIED\fP - The username/public key
47 combination was invalid, or the signature for the supplied public
48 key was invalid.
49
50 .SH SEE ALSO
51 .BR libssh2_session_init(3)