mirror of
https://github.com/clearml/dropbear
synced 2025-06-09 07:58:15 +00:00
Fix extra default -i arguments for multihop
When multihop executes dbclient it should only add -i arguments from the original commandline, not the default id_dropbear key. Otherwise multiple -i arguments keep getting added which results in servers disconnecting with too many auth attempts
This commit is contained in:
parent
c93103746e
commit
552385280a
@ -482,14 +482,6 @@ void cli_getopts(int argc, char ** argv) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (DROPBEAR_CLI_PUBKEY_AUTH)
|
|
||||||
{
|
|
||||||
char *expand_path = expand_homedir_path(DROPBEAR_DEFAULT_CLI_AUTHKEY);
|
|
||||||
loadidentityfile(expand_path, 0);
|
|
||||||
m_free(expand_path);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* The hostname gets set up last, since
|
/* The hostname gets set up last, since
|
||||||
* in multi-hop mode it will require knowledge
|
* in multi-hop mode it will require knowledge
|
||||||
* of other flags such as -i */
|
* of other flags such as -i */
|
||||||
@ -498,6 +490,17 @@ void cli_getopts(int argc, char ** argv) {
|
|||||||
#else
|
#else
|
||||||
parse_hostname(host_arg);
|
parse_hostname(host_arg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* We don't want to include default id_dropbear as a
|
||||||
|
-i argument for multihop, so handle it later. */
|
||||||
|
#if (DROPBEAR_CLI_PUBKEY_AUTH)
|
||||||
|
{
|
||||||
|
char *expand_path = expand_homedir_path(DROPBEAR_DEFAULT_CLI_AUTHKEY);
|
||||||
|
loadidentityfile(expand_path, 0);
|
||||||
|
m_free(expand_path);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if DROPBEAR_CLI_PUBKEY_AUTH
|
#if DROPBEAR_CLI_PUBKEY_AUTH
|
||||||
|
Loading…
Reference in New Issue
Block a user