add -H option to disable host key check

tests use this option.
This commit is contained in:
Ryo Nakamura
2022-11-05 22:46:02 +09:00
parent 8cb5c81fcf
commit 243bf1fa57
6 changed files with 380 additions and 24 deletions

View File

@@ -106,7 +106,7 @@ static ssh_session ssh_make_ssh_session(char *sshdst, struct ssh_opts *opts)
goto disconnect_out;
}
if (ssh_verify_known_hosts(ssh) != 0) {
if (!opts->no_hostkey_check && ssh_verify_known_hosts(ssh) != 0) {
goto disconnect_out;
}