Enabling SSH with a new Raspbian install

Upon installing Raspbian (in my case Raspian Buster Lite) on your Raspberry Pi, SSH is not enabled by default. This has been the case since 2016.

My Raspian installations are usually meant to run headless, but I connect it to a screen for the initial setup. In that case the easiest way to enable the ssh server is to run the following two commands.

sudo systemctl ssh enable
sudo systemctl ssh start

The first command will make sure ssh start at boot, the second will start the service right away. Upon the next boot, the Pi will be accessible via SSH.

If you forego connecting the Pi to a screen entirely, there is another way to enable SSH. When you write your Raspbian image to the SD card prior to installing it, add an empty file with the name 'ssh' next to the image. When Raspbian installs, it will notice the file an automatically enable SSH.

Source: https://www.raspberrypi.org/documentation/remote-access/ssh/