zngguvnf's Blog

Setup Headless RaspberryPi With SSH and WLAN


From time to time I have to setup a Raspberry Pi including ssh and wlan. But it's always super annoying to connect keyboard and screen to setup ssh and wifi. And there are other ways:

  1. Use dd or etcher to flash your (raspbian) image to the Pi
  2. Enable SSH
    • Mount sd card on your Computer (not on your raspberry pi)
    • Create an empty file named ssh and store it on the sd card on /boot
  3. Enable Wifi

    • create /boot/wpa_supplicant.conf
    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
    • Pi will get an IP adress from your DHCP-Server
    • unmount
  4. Start Rarspberry Pi
    • put in sd card
    • power on
  5. Get IP Adress

    On your computer:

    nmap -sP 192.168.XXX.1/24  # replace XXX
    • most likely the hostname you are locking for is rasberrypi ;)
  6. Connect to Raspberry Pi:

    ssh pi@IpFromPrevCommand
    # pw: raspberry
  7. Configure system

    sudo raspi-config
    # Change default password!
    # Update System
    # Change settings
Creative Commons License
https://zngguvnf.org by zngguvnf is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.