1 .\" $Id: libssh2_userauth_publickey_fromfile.3,v 1.1 2007/06/14 17:15:32 jehousley Exp $
3 .TH libssh2_userauth_publickey_fromfile 3 "1 Jun 2007" "libssh2 0.15" "libssh2 manual"
5 libssh2_userauth_publickey_fromfile - authenticate a session with a public key, read from a file
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);
13 libssh2_userauth_publickey_fromfile_ex(LIBSSH2_SESSION *session, const char *username, const char *publickey, const char *privatekey, const char *passphrase);
16 \fIsession\fP - Session instance as returned by
17 .BR libssh2_session_init(3)
19 \fIusername\fP - Remote user name to authenticate as.
21 \fIusername_len\fP - Length of username.
23 \fIpublickey\fP - Path and name of public key file. (e.g. /etc/ssh/hostkey.pub)
25 \fIprivatekey\fP - Path and name of private key file. (e.g. /etc/ssh/hostkey)
27 \fIpassphrase\fP - Passphrase to use when decoding private key file.
29 Attempt public key authentication using a PEM encoded private key file stored on disk
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.
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_SOCKET_TIMEOUT\fP -
43 \fILIBSSH2_ERROR_PUBLICKEY_UNRECOGNIZED\fP - >The username/public key
44 combination was invalid.
46 \fILIBSSH2_ERROR_PUBLICKEY_UNVERIFIED\fP - The username/public key
47 combination was invalid, or the signature for the supplied public
51 .BR libssh2_session_init(3)