diff --git a/src/cli-runopts.c b/src/cli-runopts.c index 38a73f7a..2f18e282 100644 --- a/src/cli-runopts.c +++ b/src/cli-runopts.c @@ -897,6 +897,7 @@ static void add_extendedopt(const char* origstr) { "\tUseSyslog\n" #endif "\tPort\n" + "\tStrictHostKeyChecking\n" ); exit(EXIT_SUCCESS); } @@ -925,5 +926,14 @@ static void add_extendedopt(const char* origstr) { return; } + if (match_extendedopt(&optstr, "StrictHostKeyChecking") == DROPBEAR_SUCCESS) { + if (strcmp(optstr, "accept-new") == 0) { + cli_opts.no_hostkey_check = 1; + } else { + cli_opts.always_accept_key = parse_flag_value(optstr); + } + return; + } + dropbear_log(LOG_WARNING, "Ignoring unknown configuration option '%s'", origstr); }