Set Up Raspberry Pi via SSH

Setting up a Raspberry Pi without a monitor, keyboard, or mouse can be intimidating until you know how. The following steps will get you up and running in no time using a Mac.
What you need:
- Raspberry Pi
- Micro SD card for the Pi to boot from
- Ethernet cord
Now that you have all the tools, let’s get the Pi running!
Download Raspbian
Download the latest version of Raspbian Buster Lite from the official site. This version of Raspbian does not include a GUI which keeps it lightweight.
With the image downloaded, unzip the file to unpack a .img file.
Prepare SD card
Next we will flash the SD card with Raspbian.
SSH is disabled by default on fresh installs of Raspbian. To enable it we need to add a file named ssh
to the root of the SD card. Per the Raspberry Pi documentation:
SSH can be enabled by placing a file named
ssh
, without any extension, onto the boot partition of the SD card from another computer. When the Pi boots, it looks for thessh
file. If it is found, SSH is enabled and the file is deleted. The content of the file does not matter; it could contain text, or nothing at all.
We can do this in Terminal. Be sure to replace “SD card” with the actual mounted disk’s name.
cd /Volumes/SD card
touch ssh
Eject the SD card and put it into the Raspberry Pi.
Start up the Pi
Plug in the ethernet cable and plug in the Pi/switch the Pi on to start it up.
Connect Remotely
Now we need to get the IP address of the Pi. Most routers will show all connected devices; alternatively you can run the arp command in Terminal on the Mac
arp -a
Connect to the Pi via the default credentials (Username: pi and Password: raspberry).
Enable ssh permanently by running these commands on the Pi
sudo systemctl enable ssh
sudo systemctl start ssh