1libssh2_session_hostkey(3)          libssh2         libssh2_session_hostkey(3)
2
3
4

NAME

6       libssh2_session_hostkey - get the remote key
7

SYNOPSIS

9       #include <libssh2.h>
10
11       const char *
12       libssh2_session_hostkey(LIBSSH2_SESSION *session,
13                               size_t *len, int *type);
14

DESCRIPTION

16       Returns a pointer to the current host key, the value len points to will
17       get the length of the key.
18
19       The value type points to the type of hostkey  which  is  one  of:  LIB‐
20       SSH2_HOSTKEY_TYPE_RSA,      LIBSSH2_HOSTKEY_TYPE_DSS,      or      LIB‐
21       SSH2_HOSTKEY_TYPE_UNKNOWN.
22
23

RETURN VALUE

25       A pointer, or NULL if something went wrong.
26

SEE ALSO

28       libssh2_knownhost_check(3) libssh2_knownhost_add(3)
29
30
31
32libssh2 0.15                      1 Jun 2007        libssh2_session_hostkey(3)
Impressum