I have an SSL cURL request that fails from a single machine with the following error:

curl: (51) SSL peer certificate or SSH remote key was not OK

This error seems to have popped up overnight, and isolated to a single machine. The request was working, then the machine was shutdown. Today, the machine was powered up and the request no longer works.


  • Machine is running linux 3.12.28
  • Multiple other machines have no problem with the same request, all on the same network.
  • The network of the machine in question seems to be fine otherwise

Things tried:

  • Setting the nameserver in /etc/resolv.conf to
  • Power cycling
  • Disabled all but one network interface

Has anyone had this problem before? What did you do to fix it? Any ideas for further debugging? Thank you.

  • Have you checked the time of the machine? The correct time (more or less) is necessary to validate the certificates. – Steffen Ullrich Mar 23 '15 at 21:33
  • Great suggestion. I just checked, and the time is correct. – r_robotics Mar 23 '15 at 21:44
  • 1
    Try using curl -v or curl --trace - (followed by the rest of the curl arguments) on the problem machine and a working one and add the results to your question. – Paul Haldane Mar 23 '15 at 22:13
  • Great! Thank you. I will try that and report back with my results. – r_robotics Mar 25 '15 at 0:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.