logo
Jiff Slater
🤔 About
✍️ Contact
📚Knowledge
30 Jul 2021
These articles have been archived. You may find them useful but I am no longer offering support for them. Check out my latest articles on plkt.io.
Enabling SSH + WiFi on Raspberry Pi OS
15 January 2021

Setting up SSH on Raspberry Pi OS is simple – create an empty ssh file in the boot partition root directory and edit the /etc/wpa_supplicant/wpa_supplicant.conf to include the wireless network information.

# touch /mnt/raspberry_boot/ssh
# NETWORK_NAME=somewirelessssid NETWORK_PASSWORD=somewirelesspassword echo -e 'network={\n ssid="$NETWORK_NAME"\n  psk="$NETWORK_PASSWORD"\n  key_mgmt=WPA-PSK\n}' | tee -a /mnt/raspberry_root/etc/wpa_supplicant/wpa_suppliant.conf
# cat /mnt/raspberry_root/etc/wpa_supplicant/wpa_suppliant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="somewirelessssid"
psk="somewirelesspassword"
key_mgmt=WPA-PSK
}
# eject /mnt/raspberry*

Once the Raspberry Pi boots up, you can access it over the data USB cable if you’ve already configured that and also over the wireless network, presuming it can automatically be assigned an IP address.

Remember to enable ssh to run on each boot with systemctl enable ssh or via raspi-config.