Headless Raspberry Pi Setup using Ethernet cable

Print Friendly, PDF & Email

This post explains how to setup Raspberry Pi operating system if you do not have a keyboard or HDMI cable. This process is known as “Headless” setup.

The key is to SSH in and configure the Raspberry.

Required –

  • Raspberry Pi device.
  • The raspberry installation image    
    • You may use either RASPBIAN STRETCH WITH DESKTOP or RASPBIAN STRETCH LITE
  • A Card Reader
  • Network cable
  • A router on which you have admin rights.
  • A computer running Windows, Linux or Mac. I have prepared this post for the Windows OS.
  • A SSH client. Like Putty

 

Install Rasbian OS on SD Card

Download and install the Raspberry OS image onto the SD card as per the instructions given on the official raspberry website.

Add SSH to the SD Card Root

Enable SSH by placing a file named “ssh” (without any extension) onto the boot partition of the SD card:

SSH (Secure SHell) is a networking protocol which allows you to remotely log into a Linux computer and control it from a remote command line. This was enabled by default however it started causing security issues.

In all the latest releases of the Raspian, they have disabled SSH by default.

If we enable SHH, then we would be able to configure the Raspberry using any SSH client (like Putty).

The boot partition on a Pi should be accessible from any machine with an SD card reader, on Windows, Mac, or Linux. If you want to enable SSH, all you need to do is to put a file called ssh in the /boot/ directory. The contents of the file don’t matter: it can contain any text you like, or even nothing at all. When the Pi boots, it looks for this file; if it finds it, it enables SSH and then deletes the file.

SSH can still be turned on or off from the Raspberry Pi Configuration application or raspi-config; this is simply an additional way to turn it on if you can’t easily run either of those applications.

 

Boot your Pi

Insert your SD card and a network cable into the Pi. Power on your Pi.

Access the router’s DHCP table

To configure your Pi, you need its IP address. You can find this in your Router’s DHCP lease allocation table:

Secure Shell into your Pi

Launch Putty, enter the IP address of your PI to connect

On the first connection attempt, a security warning will appear. Just press “Yes” since you’re connecting to your own Pi:

We would be displayed the login

The default credentials are:

 

username: pi

password: raspberry

 

        

Configure your Pi using the Raspberry Pi Software Configuration Tool

Type in the following command to launch the Raspberry Pi Software Configuration Tool

 

sudo raspi-config

 

Scroll down to 5. Interfacing Options->P2 SSH

Click on Yes when prompted

 

Connect using VNC or Remote Desktop Connection to connect to the Pi.

If you like to use RDP, then xrdp needs to be installed. Have prepared another post for it.

Leave a Reply

Your email address will not be published. Required fields are marked *