libssh2
1.\" Copyright (C) Daniel Stenberg
2.\" SPDX-License-Identifier: BSD-3-Clause
3.TH libssh2_knownhost_writefile 3 "28 May 2009" "libssh2" "libssh2"
4.SH NAME
5libssh2_knownhost_writefile - write a collection of known hosts to a file
6.SH SYNOPSIS
7.nf
8#include <libssh2.h>
9
10int
11libssh2_knownhost_writefile(LIBSSH2_KNOWNHOSTS *hosts,
12const char *filename, int type);
13.fi
14.SH DESCRIPTION
15Writes all the known hosts to the specified file using the specified file
16format.
17
18\fIfilename\fP specifies what filename to create
19
20\fItype\fP specifies what file type it is, and
21\fILIBSSH2_KNOWNHOST_FILE_OPENSSH\fP is the only currently supported
22format.
23.SH RETURN VALUE
24Returns a regular libssh2 error code, where negative values are error codes
25and 0 indicates success.
26.SH AVAILABILITY
27Added in libssh2 1.2
28.SH SEE ALSO
29.BR libssh2_knownhost_readfile(3)
30.BR libssh2_knownhost_add(3)
31