If you’re banging your head on your keyboard because your Raspberry Pi is pingable but connecting via ssh gives you “Connection Refused” errors, read on.
Buried in an hour of frustration was this post on stackexchange:
All you need is to place an empty file named ‘ssh’ onto the boot (FAT) partition of your SD card (no need to mount ext3). Tested with 2016-11-25-raspbian-jessie-lite.img.
Tested this with RASPBIAN JESSIE LITE/Pixel release 2017-04-10. Hope this helps someone save some time.