summaryrefslogtreecommitdiffstats
path: root/libssh/keyfiles.c
diff options
context:
space:
mode:
Diffstat (limited to 'libssh/keyfiles.c')
-rw-r--r--libssh/keyfiles.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libssh/keyfiles.c b/libssh/keyfiles.c
index e09de67..3e36989 100644
--- a/libssh/keyfiles.c
+++ b/libssh/keyfiles.c
@@ -1648,6 +1648,11 @@ int ssh_is_server_known(ssh_session session) {
}
} while (1);
+ if ( (ret == SSH_SERVER_NOT_KNOWN) && (session->StrictHostKeyChecking == 0) ) {
+ ssh_write_knownhost(session);
+ ret = SSH_SERVER_KNOWN_OK;
+ }
+
SAFE_FREE(host);
if (file != NULL) {
fclose(file);