1libssh2_knownhost_readfile(3) libssh2 libssh2_knownhost_readfile(3)
2
3
4
6 libssh2_knownhost_readfile - parse a file of known hosts
7
9 #include <libssh2.h>
10
11 int
12 libssh2_knownhost_readfile(LIBSSH2_KNOWNHOSTS *hosts,
13 const char *filename, int type);
14
16 Reads a collection of known hosts from a specified file and adds them
17 to the collection of known hosts.
18
19 filename specifies which file to read
20
21 type specifies what file type it is, and LIBSSH2_KNOWNHOST_FILE_OPENSSH
22 is the only currently supported format. This file is normally found
23 named ~/.ssh/known_hosts
24
26 Returns a negative value, a regular libssh2 error code for errors, or a
27 positive number as number of parsed known hosts in the file.
28
30 Added in libssh2 1.2
31
33 libssh2_knownhost_init(3) libssh2_knownhost_free(3) libssh2_known‐
34 host_check(3)
35
36
37
38libssh2 28 May 2009 libssh2_knownhost_readfile(3)