Buy commercial curl support. We
help you work out your issues, debug your libcurl applications, use the API,
port to new platforms, add new features and more. With a team lead by the
curl founder Daniel himself.
Help With curl error 60 and the known _hosts file
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Michael Newman via curl-users <curl-users_at_lists.haxx.se>
Date: Thu, 19 Mar 2026 04:24:04 +0700
Please understand that I am a naive user who understands very little of how this all works.
I have four Raspberry Pies in two different locations each of which uses curl to upload a web cam image to a web host once every two minutes. This has been working well for many years.
Suddenly at about 3:08 PM today (Thailand time) all of the uploads began failing as follows:
Wed Mar 18 15:08:21 +07 2026 Upload Ended 7 - raspsky
curl: (7) Failed to connect to mydomain.com port 22: Connection refused
At about 3:34 that changed to:
Wed Mar 18 15:34:19 +07 2026 Upload Ended 60 - raspsky
curl: (60) SSL peer certificate or SSH remote key was not OK
Assuming that it was the SSH remote key that was the problem I tried logging in to the host via SSH. Sure enough, I was told that the host key did not match the known_hosts file. So, I permitted the “new” host key to be added to the known_hosts file after which I was able to log in via SSH which I can still do.
Sadly, curl still fails even though the new and known-correct host key is in the known_hosts file.
So, what do I need to do to get curl to find the new host key in the updated known_hosts file?
Or, do I have this completely wrong and need to do something completely different?
Thanks in advance,
Mike Newman
Korat, Thailand
Received on 2026-03-18
Date: Thu, 19 Mar 2026 04:24:04 +0700
Please understand that I am a naive user who understands very little of how this all works.
I have four Raspberry Pies in two different locations each of which uses curl to upload a web cam image to a web host once every two minutes. This has been working well for many years.
Suddenly at about 3:08 PM today (Thailand time) all of the uploads began failing as follows:
Wed Mar 18 15:08:21 +07 2026 Upload Ended 7 - raspsky
curl: (7) Failed to connect to mydomain.com port 22: Connection refused
At about 3:34 that changed to:
Wed Mar 18 15:34:19 +07 2026 Upload Ended 60 - raspsky
curl: (60) SSL peer certificate or SSH remote key was not OK
Assuming that it was the SSH remote key that was the problem I tried logging in to the host via SSH. Sure enough, I was told that the host key did not match the known_hosts file. So, I permitted the “new” host key to be added to the known_hosts file after which I was able to log in via SSH which I can still do.
Sadly, curl still fails even though the new and known-correct host key is in the known_hosts file.
So, what do I need to do to get curl to find the new host key in the updated known_hosts file?
Or, do I have this completely wrong and need to do something completely different?
Thanks in advance,
Mike Newman
Korat, Thailand
-- Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users Etiquette: https://curl.se/mail/etiquette.html
- application/pkcs7-signature attachment: smime.p7s