I recently purchased a few Raspberry Pi 4’s and didnt want to connect them to a Monoitor/Keyboard etc.. So I looked into a way to deploy the OS/Config with the ability to SSH onto them to complete any further configuration.

My initial purchase included:

  • 2 x Raspberry Pi 4 Model B (2GB RAM)
  • 2 x 16GB Micro SD Cards
  • 2 x Official Raspberry PI 5.1v/3A Power Supplies

First thing to do was to obtain the Raspbian Image, which can be downloaded from HERE

To install the Image, I downloaded and installed Balena Etcher from HERE

I use a MAC, so I first formatted the SD Card using the Disk Utility to MS-DOS (FAT)


Open up Etcher and select the Downloaded Image


Once you have chosen the image and selected the SD Card as the Target, Click Flash!


Once this is completre, we are going to create a file to allow SSH connectivity to the PI:

Remove the SD Card from your Computer and re-insert. When you can see the Card Mounted, navigate to the /Volumes/boot partition and create a file called ssh


Then we will create a file to store Network configuration, so the Pi will automatically connect to the WiFi:

Create a file called: wpa_supplicant.conf in the same directory


Copy the following Text and Modify the Country Code, Network Name (Your SSID) and the WiFi Password:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev


Copy the edited config and open up the wpa_supplicant.conf file using a Text Editor (I used VI, so dont forget to enter Insert Mode) and pasted it in.


Save the File (In VI: <ESC> :wq!) and exit the Terminal

Eject the SD Card and Insert into the Raspberry Pi.

Power up the Pi and wait a few minutes. The PI will connect the Network and get an IP Address from DHCP. To find out what Address it had been given, you can check from your Router or I used Zenmap.

I ran a scan on the Local network, which shows all the connected Devices – the Raspberry PIs are obvious as the MAC Address shows (Raspberry Pi Trading)


You can see that Port22 is open for SSH connectivity


Now I can connect to the Pi using ssh and the default credentials:

Username = pi
Password = raspberry


You could go on a perform other configurations from here, but the last thing I will do for this post, is to expand the Filesystem to fill the entire SD Card

From the CLI, type:

sudo raspi-config

Select A1 Expand Filesystem


You can see this has now expanded across the entire 16GB Card