1libssh2_knownhost_readline(3) libssh2 libssh2_knownhost_readline(3)
2
3
4
6 libssh2_knownhost_readline - read a known host line
7
9 #include <libssh2.h>
10
11 int
12 libssh2_knownhost_readline(LIBSSH2_KNOWNHOSTS *hosts,
13 const char *line, size_t len, int type):
14
16 Tell libssh2 to read a buffer as it if is a line from a known hosts
17 file.
18
19 line points to the start of the line
20
21 len is the length of the line in bytes
22
23 type specifies what file type it is, and LIBSSH2_KNOWNHOST_FILE_OPENSSH
24 is the only currently supported format. This file is normally found
25 named ~/.ssh/known_hosts
26
28 Returns a regular libssh2 error code, where negative values are error
29 codes and 0 indicates success.
30
32 Added in libssh2 1.2
33
35 libssh2_knownhost_get(3) libssh2_knownhost_writeline(3) libssh2_known‐
36 host_readfile(3)
37
38
39
40libssh2 28 May 2009 libssh2_knownhost_readline(3)