diff options
author | Ruben Garcia Azuara <rubenga@tid.es> | 2010-04-06 20:07:01 +0200 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2010-04-07 11:29:47 +0200 |
commit | 5a2abd34ce9ad97c69906c5fb7b07e26e96fceaa (patch) | |
tree | da155233397d23cd1f8d0f76b0108570c61079e7 /libssh/keyfiles.c | |
parent | 14eb593af3c41ea439f01d34aaae497d8420f316 (diff) | |
download | libssh-5a2abd34ce9ad97c69906c5fb7b07e26e96fceaa.tar.gz libssh-5a2abd34ce9ad97c69906c5fb7b07e26e96fceaa.tar.xz libssh-5a2abd34ce9ad97c69906c5fb7b07e26e96fceaa.zip |
Added support for StrictHostKeyChecking and UserKnownHostsFile parameters.
Added OpenSSH parameters to libssh:
- StrictHostKeyChecking
- UserKnownHostsFile
This parameters are useful to avoid checking the fingerprint. Eg:
~/.ssh/config:
Host 192.10.20.30
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
Signed-off-by: Ruben Garcia Azuara <rubenga@tid.es>
Signed-off-by: Andreas Schneider <mail@cynapses.org>
Diffstat (limited to 'libssh/keyfiles.c')
-rw-r--r-- | libssh/keyfiles.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libssh/keyfiles.c b/libssh/keyfiles.c index e09de675..3e36989c 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); |