1libssh2_userauth_publickey_fromfillieb(s3s)h2 mlainbusaslh2_userauth_publickey_fromfile(3)
2
3
4

NAME

6       libssh2_userauth_publickey_fromfile  -  authenticate  a  session with a
7       public key, read from a file
8

SYNOPSIS

10       #include <libssh2.h>
11
12       int  libssh2_userauth_publickey_fromfile_ex(LIBSSH2_SESSION   *session,
13       const char *username, unsigned int username_len, const char *publickey,
14       const char *privatekey, const char *passphrase);
15
16       int  libssh2_userauth_publickey_fromfile_ex(LIBSSH2_SESSION   *session,
17       const  char  *username,  const char *publickey, const char *privatekey,
18       const char *passphrase);
19
20

DESCRIPTION

22       session - Session instance as returned by libssh2_session_init(3)
23
24       username - Remote user name to authenticate as.
25
26       username_len - Length of username.
27
28       publickey   -   Path   and   name   of   public   key    file.    (e.g.
29       /etc/ssh/hostkey.pub)
30
31       privatekey - Path and name of private key file. (e.g. /etc/ssh/hostkey)
32
33       passphrase - Passphrase to use when decoding private key file.
34
35       Attempt  public key authentication using a PEM encoded private key file
36       stored on disk
37
38

RETURN VALUE

40       Return  0  on  success  or  negative  on  failure.   It  returns   LIB‐
41       SSH2_ERROR_EAGAIN   when   it   would   otherwise   block.  While  LIB‐
42       SSH2_ERROR_EAGAIN is a negative number, it isn't really a  failure  per
43       se.
44
45

ERRORS

47       LIBSSH2_ERROR_ALLOC -  An internal memory allocation call failed.
48
49       LIBSSH2_ERROR_SOCKET_SEND - Unable to send data on socket.
50
51       LIBSSH2_ERROR_SOCKET_TIMEOUT -
52
53       LIBSSH2_ERROR_PUBLICKEY_UNRECOGNIZED  - >The username/public key combi‐
54       nation was invalid.
55
56       LIBSSH2_ERROR_PUBLICKEY_UNVERIFIED - The username/public  key  combina‐
57       tion  was  invalid,  or  the  signature for the supplied public key was
58       invalid.
59
60

SEE ALSO

62       libssh2_session_init(3)
63
64
65
66libssh2 0.15                      1 Jun 2l0i0b7ssh2_userauth_publickey_fromfile(3)
Impressum