summaryrefslogtreecommitdiff
path: root/cli-kex.c
diff options
context:
space:
mode:
Diffstat (limited to 'cli-kex.c')
-rw-r--r--cli-kex.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/cli-kex.c b/cli-kex.c
index fd2e48e..3859109 100644
--- a/cli-kex.c
+++ b/cli-kex.c
@@ -227,6 +227,11 @@ static void checkhostkey(unsigned char* keyblob, unsigned int keybloblen) {
buffer * line = NULL;
int ret;
+ if (cli_opts.no_hostkey_check) {
+ fprintf(stderr, "Caution, skipping hostkey check for %s\n", cli_opts.remotehost);
+ return;
+ }
+
hostsfile = open_known_hosts_file(&readonly);
if (!hostsfile) {
ask_to_confirm(keyblob, keybloblen);