diff options
author | Matt Johnston <matt@ucc.asn.au> | 2007-02-11 08:50:21 +0000 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2007-02-11 08:50:21 +0000 |
commit | cd0a08896c83ab20f7cc04e755ce38b1525d47a3 (patch) | |
tree | 627e0a8c374d5c3dd2699470756b5267b34ee587 /cli-runopts.c | |
parent | fc0e723805fa1940c15d4ffafbf950a7e1790af8 (diff) |
Add '-y' option to dbclient to accept the host key without checking
- patch from Luciano Miguel Ferreira Rocha.
--HG--
extra : convert_revision : 924b731b50d4147eed8e9382c98a2573259a6cad
Diffstat (limited to 'cli-runopts.c')
-rw-r--r-- | cli-runopts.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cli-runopts.c b/cli-runopts.c index 1a077b9..fc67850 100644 --- a/cli-runopts.c +++ b/cli-runopts.c @@ -52,6 +52,7 @@ static void printhelp() { "-T Don't allocate a pty\n" "-N Don't run a remote command\n" "-f Run in background after auth\n" + "-y Always accept remote host key if unknown\n" #ifdef ENABLE_CLI_PUBKEY_AUTH "-i <identityfile> (multiple allowed)\n" #endif @@ -93,6 +94,7 @@ void cli_getopts(int argc, char ** argv) { cli_opts.no_cmd = 0; cli_opts.backgrounded = 0; cli_opts.wantpty = 9; /* 9 means "it hasn't been touched", gets set later */ + cli_opts.always_accept_key = 0; #ifdef ENABLE_CLI_PUBKEY_AUTH cli_opts.privkeys = NULL; #endif @@ -148,6 +150,9 @@ void cli_getopts(int argc, char ** argv) { /* A flag *waves* */ switch (argv[i][1]) { + case 'y': /* always accept the remote hostkey */ + cli_opts.always_accept_key = 1; + break; case 'p': /* remoteport */ next = &cli_opts.remoteport; break; |