Quoting [the documentation](https://www.raspberrypi.org/documentation/remote-access/ssh/):

> As of the November 2016 release, Raspbian has the SSH server disabled by default. You will have to enable it manually. 

To enable SSH on machines through console:

> Enter `sudo raspi-config` in the terminal, first select `advanced options`, then navigate to `ssh`, press <kbd>Enter</kbd> and select `Enable or disable ssh server`.

To enable SSH for headless machines:

> For headless setup, SSH can be enabled by placing a file named `ssh`, without any extension, onto the boot partition of the SD card.