geom_gate userland utility improvements
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

53 lines
1.8 KiB

  1. .TH libssh2_userauth_publickey_fromfile 3 "1 Jun 2007" "libssh2 0.15" "libssh2 manual"
  2. .SH NAME
  3. libssh2_userauth_publickey_fromfile - authenticate a session with a public key, read from a file
  4. .SH SYNOPSIS
  5. #include <libssh2.h>
  6. .nf
  7. int libssh2_userauth_publickey_fromfile_ex(LIBSSH2_SESSION *session,
  8. const char *username,
  9. unsigned int ousername_len,
  10. const char *publickey,
  11. const char *privatekey,
  12. const char *passphrase);
  13. .SH DESCRIPTION
  14. \fIsession\fP - Session instance as returned by
  15. \fBlibssh2_session_init_ex(3)\fP
  16. \fIusername\fP - Pointer to user name to authenticate as.
  17. \fIusername_len\fP - Length of \fIusername\fP.
  18. \fIpublickey\fP - Path name of the public key file.
  19. (e.g. /etc/ssh/hostkey.pub). If libssh2 is built against OpenSSL, this option
  20. can be set to NULL.
  21. \fIprivatekey\fP - Path name of the private key file. (e.g. /etc/ssh/hostkey)
  22. \fIpassphrase\fP - Passphrase to use when decoding \fIprivatekey\fP.
  23. Attempt public key authentication using a PEM encoded private key file stored
  24. on disk
  25. .SH RETURN VALUE
  26. Return 0 on success or negative on failure. It returns
  27. LIBSSH2_ERROR_EAGAIN when it would otherwise block. While
  28. LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se.
  29. .SH ERRORS
  30. \fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
  31. \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
  32. \fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP -
  33. \fILIBSSH2_ERROR_PUBLICKEY_UNVERIFIED\fP - The username/public key
  34. combination was invalid.
  35. \fILIBSSH2_ERROR_AUTHENTICATION_FAILED\fP - Authentication using the supplied
  36. public key was not accepted.
  37. .SH SEE ALSO
  38. .BR libssh2_session_init_ex(3)