libssh2_userauth_publickey(3)

libssh2_userauth_publickey3

Authenticate using a callback function

Usage

#include <libssh2.h>
int
libssh2_userauth_publickey(LIBSSH2_SESSION *session,
                           const char *user,
                           const unsigned char *pubkeydata,
                           size_t pubkeydata_len,
                           sign_callback,
                           void **abstract);

Overview

Authenticate with the sign_callback callback that matches the prototype below

Callback

int name(LIBSSH2_SESSION *session, unsigned char **sig, size_t *sig_len,
         const unsigned char *data, size_t data_len, void **abstract);

This function gets called...

Return value

Return 0 on success or negative on failure.

Releases

8 releases since Debian 7 (Wheezy); the text changed 1 time.

  1. 7–12
  2. 13–Arch

From libssh2 1.11.1-7 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.