From 37dc2a52797c30dc23ffeca5a7f43097d85f895a Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Sun, 12 Jul 2009 23:17:12 +0200 Subject: [PATCH] Reflect the SSH_SERVER_NOT_KNOWN add-on in sample --- sample.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sample.c b/sample.c index 67d17657..599163fb 100644 --- a/sample.c +++ b/sample.c @@ -469,6 +469,10 @@ int main(int argc, char **argv){ ssh_disconnect(session); ssh_finalize(); exit(-1); + case SSH_SERVER_FILE_NOT_FOUND: + fprintf(stderr,"Could not find known host file. If you accept the host key here,\n"); + fprintf(stderr,"the file will be automatically created.\n"); + /* fallback to SSH_SERVER_NOT_KNOWN behaviour */ case SSH_SERVER_NOT_KNOWN: hexa = ssh_get_hexa(hash, hlen); free(hash);