aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 58e5bf960..aeaa58831 100644
--- a/src/main.c
+++ b/src/main.c
@@ -4694,6 +4694,16 @@ operate(struct Configurable *config, int argc, argv_item_t argv[])
my_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE);
my_setopt(curl, CURLOPT_SSL_VERIFYHOST, 1);
}
+ else {
+ char *home = homedir();
+ char *file = aprintf("%s/%sssh/known_hosts", home, DOT_CHAR);
+ if(home && file) {
+ free(home);
+ my_setopt_str(curl, CURLOPT_SSH_KNOWNHOSTS, file);
+ }
+ else
+ return CURLE_OUT_OF_MEMORY;
+ }
if(config->no_body || config->remote_time) {
/* no body or use remote time */