RaspberryPI #4: silent install

Silent installation and configuration of a RaspberryPi through SSH. No Screen & keyboard (headless) nor Ethernet cable required!

Rphl-Mstl
Tech notes and Geek stuff
3 min readNov 11, 2018

--

This is an updated Linux version of the guide published last year.

Step 1: SD card preparation

Go to the Raspberry website to download the latest Raspbian Lite image. This minimal image does not include and desktop environment. That won’t be needed since we’ll operate the raspberry in SSH command lines only! You’ll be able to install whatever desktop you want afterward, if needed.

Burn the image on the SD card with Etcher a minimalist software specialized in burning image to SD cards and USB drives. Once the image SD Card is flashed, open your file manager.

  1. Activate SSH on the Raspberry directly from the SD card: just add an empty file named ssh (no extension) at the root of the /boot folder on your SD Card. This file will activate SSH on the Raspberry.
  2. Activate the Wifi to avoid using an Ethernet cable to identify the Pi on your Network, add a wpa_supplicant.conf file at the root of the /boot folder. The file will contain your Wifi SSID and password, and will be erased after the first boot:
country=us
update_config=1
ctrl_interface=/var/run/wpa_supplicant
network={
scan_ssid=1
ssid="MyNetworkSSID"
psk="Pa55w0rd1234"
}

Now, move the SD Card to the Raspberry, and start it. The first boot should take 60s, so just wait a moment.

Step2: IP address and SSH login

Now, in order to connect to your Raspberry Pi from another machine using SSH you need to know the Pi’s IP address. Since we already activated the Wifi, the Pi should appear on your network. Use the nmap command to identify your devices:

nmap -sL 192.168.1.* | grep \(192

You should find a “raspberrypi.home” device, followed by its IP address:

Nmap scan report for raspberrypi.home (192.168.1.21)

You can now SSH into the Raspberry from your desktop. The default login / password of your Pi is pi / raspberry.

ssh pi@192.168.1.21

Should you need to reset any old host key and allow connection, enter the following command:

ssh-keygen -R 192.168.1.21

Here you go:

Step 3: update

From this point, run the Raspbian configuration tool to finish the setup:
sudo raspi-config:

  • Change your password
  • Update the system
  • Install any application you need

Enjoy!

--

--

Rphl-Mstl
Tech notes and Geek stuff

OS explorer, UI & UX passionate, Voxels crafter, code lover, Video Games player, Podcasts listener, Music amateur // Digital Publishing professional