tool_operate: fail SSH transfers without server auth

This now insists on using a server auth option unless --insecure is
provided. As an added bonus, it now also only checks for the knownhosts
file once (if found).

Ref: #16197
Closes #16205
This commit is contained in:
Daniel Stenberg 2025-02-22 13:05:17 +01:00
parent 4c5099868e
commit e1b3d46944
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
3 changed files with 18 additions and 7 deletions

View file

@ -324,6 +324,8 @@ struct GlobalConfig {
char *libcurl; /* Output libcurl code to this filename */
char *ssl_sessions; /* file to load/save SSL session tickets */
char *help_category; /* The help category, if set */
char *knownhosts; /* known host path, if set. curl_free()
this */
struct tool_var *variables;
struct OperationConfig *first;
struct OperationConfig *current;