1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-09-01 06:21:56 +03:00

Reflect the SSH_SERVER_NOT_KNOWN add-on in sample

This commit is contained in:
Aris Adamantiadis
2009-07-12 23:17:12 +02:00
parent d5b6f6cc37
commit 1301864f92

View File

@@ -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);