Scan terminated with error: We received an error response when trying
to contact the Wordfence scanning servers. The HTTP status code was [0]
and the error from CURL was couldn’t connect to host.

If you are having issues connecting to the Wordfence servers when scanning or getting a key, here are some things you can try:

Uncheck "Enable ssl verification". It is found under Tools, on the Diagnostics tab at the bottom of the page.

Make sure your cUrl is not outdated and allows outbound connections. Run the connectivity tester (near bottom of the Wordfence options page) to test. If you receive an error, a ticket with your hosting provider may be required.

Check iptables (linux) to make sure you are accepting those connections (many thanks to Patrick) The following code should be checked and adjusted for your particular site, by an experienced server manager or your hosting company:

When you run a scan your web server needs to be able to connect to our scanning server which is noc1.wordfence.com, so that it can send hashes of files and signatures for comparison against known bad items. Your web server must be able to connect to port 443 and port 80 of noc1.wordfence.com. To test if it can do this, you can SSH to your server and run the following commands. If you don’t know how to do this, ask your administrator or hosting company.

telnet noc1.wordfence.com 80

and

telnet noc1.wordfence.com 443

You should get a response that says "Connected to noc1.wordfence.com." As long as you can connect to both port 80 and port 443, you should be able to scan.