After configuring a new Raspberry Pi Zero W, I have not been able to ssh into it over WiFi. The IP address is assigned and pingable, but I get 'connection refused' errors.

After some research, I discovered one possible solution is to replace the SSH host keys on the pi.

But it's a Catch-22, because I can't login to the pi to change the keys that I need to change to be able to log into the pi. 

What can I do?

*UPDATE 1: In comments below, @Milliways says there is "no evidence" that this problem actually exists (there is, I just found it again by Googling and posted it below). Therefore, I assure you other people have had similar issues. Whatever causes this particular 'connection refused' scenario, regenerating Raspian SSH host keys can resolve it; it certainly did for me!  What I don't know yet is what the underlying issue is, an WHY I needed to replace the host keys, just that it worked.*

*I will update this question when I find out. I just located the a reference to the problem/workaround. Continuing to research the issue and will provide further updates if and as I get more information.*

***@Milliways**: Please look at this thread, last entry, and also look at the timestamp for it:*

https://www.reddit.com/r/raspberry_pi/comments/704v5y/ssh_connection_refused_off_a_headless_setup/