Quoting the documentation:
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 selectadvancedInterfacing optionsOptions
, then navigate tossh
, press Enter and selectEnable 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.