Setup Raspberry 3B For Headless SSH

This How To Setup Raspberry 3B For Headless SSH helps you to setup a Raspberry without display whilst leveraging on a remote computer.

Setup Raspberry For Headless SSH

Setup Raspberry 3B For Headless SSH

 

Index of Setup Raspberry 3B For Headless SSH

Background

If you like to install a Raspberry without a screen attached, then you will be happy for leveraging on this HowTo. It basically allows you to login to your Raspberry remotely after you have leveraged on the Raspberry Pi Imager to write the Raspberry Pi OS on the SD Card.

How To Setup Raspberry 3B For Headless SSH Access

Step 1 – Setup

First of all, download and install the Raspberry Pi Imager that allows to write the Raspberry Pi OS onto your preferred SD card. Please ensure this SD card is empty or the data that you have on this SD card is not needed anymore. 

Step 2 – Enable SSH

Once installed, start the Raspberry Pi Imager and select your preferred operating system, e.g. Raspberry Pi OS. Secondly, select the SD card on which you like to write the Raspberry Pi OS. Before you click “WRITE” you select the Raspberry Pi Imager Settings, as of the below picture.

 

Raspberry Pi Imager Settings

Raspberry Pi Imager Settings

If you are on a Mac computer, the computer most likely asks you whether you like to leverage on the WiFi settings of your Mac that are stored in the keychain. This makes the WiFi configuration very comfortable! You simply say yes, if the Raspberry will belong to the same WiFi than your Mac. If not, say no. 

 

Pre-Fill WiFi from Keychain

Pre-Fill WiFi from Keychain

 

Now, and this is important, we will be configuring in the Setting SSH by simply

  • Click Enable SSH (as in the below picture)
  • Use either password authentication of if you have a key, you better leverage on public-key authentication. On your Mac you can find your public key in your home-directory in the hidden subdirectory called .ssh
Enable SSH with Raspberry Pi Imager

Enable SSH with Raspberry Pi Imager allowing Setup Raspberry 3B For Headless SSH

Finally, if you have not leveraged on the Mac Keychain and if you not on a Mac computer, you can pre-configure the WiFi network to which the Raspberry will belong to. In case you do not like to leverage on WiFi but on LAN only, then you do not configure this option. 

Enable WiFi Configuration with Raspberry Imager

Enable WiFi Configuration with Raspberry Imager

“Save” the configurations made. You will be leaving the Settings menu and you will be back on the main Raspberry Pi Imager menu. Click “WRITE”. NOTE: Writing the Raspberry Pi OS to the SD Card will DELETE all your data on the SD card. Make a backup before writing the SD card!

Raspberry Pi Image will install and enable the Setup Raspberry 3B For Headless SSH

Raspberry Pi Imager will install and enable the Setup Raspberry 3B For Headless SSH

 

Step 3 – Find IP Address

Find out the IP Address of your Raspberry Pi. To do so, plug the SD card into the Raspberry Pi and try via your internet router to find out the IP address that was attached to your Raspberry Pi. I suggest to have a view of the IP addresses that your router provided to the devices in the network before you switch on the Raspberry Pi and then you compare after you switched on the Raspberry Pi. You would like to do this step via LAN cable, hence plug the Raspberry directly via LAN cable into the router. 

In this example, the router attached the IP address of: 192.168.176.150

Step 4 – Connect by SSH

Since you know now the IP address, you are ready to go! I suggest for connecting via SSH to the Raspberry, you leverage for Windows on Putty, whilst you simply use the standard Terminal on a Mac or Linux system.

For connecting with a Mac or Linux terminal simply typ:

ssh pi@<IP ADDRESS OF YOUR RASPBERRY>

An example could be: ssh pi@192.168.176.150

Username Password:

  • Since the Raspberry is newly setup, the default username is “pi” and the default password is “raspberry”. NOTE: You should change the password after first login!
  • For Mac and Linux and since you used to login “ssh pi@<IP Address of your Raspberry” you only need to type the password
  • For Windows you will need to enter both, username and password
  • If you have in Step 2 selected key authentication, than you will most likely not need to type a password

You will observe a screen similar to the below, but of course with your IP addresses and your hostnames. One point, during the first login you will be asked to accept the new fingerprint that was detected. Respond with “Y” for yes. You can change the keys any time at a later stage. 

mike@Mikes-Mac ~ % ssh pi@192.168.176.150
The authenticity of host '192.168.176.150 (192.168.176.150)' can't be established.
ED25519 key fingerprint is SHA256:xkNXXXXXXXXXXwFJfJ/SV6ZhlnfaxfGIIXXXXXXXXXX.
This host key is known by the following other names/addresses:
    ~/.ssh/known_hosts:6: 192.168.176.222
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.168.176.150' (ED25519) to the list of known hosts.
pi@192.168.176.150's password: 
Linux raspberrypi 5.15.61-v7+ #1579 SMP Fri Aug 26 11:10:59 BST 2022 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Dec 30 14:06:29 2022 from 192.168.176.222

SSH is enabled and the default password for the 'pi' user has not been changed.
This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password.

pi@raspberrypi:~ $

Here you go!

Step 5 – Configure Secure SSH Usage

It is important to configure SSH securely. Please check out the following How To guide that will help you for this. It’s not only helping you for SSH, but also for many other aspects. 

Step 6 – Enjoy Using Your Newly Setup Raspberry

Enjoy!

Additional Information of Setup Raspberry 3B For Headless SSH

Find more information about Raspberry on the official Raspberry page

Follow me

It would be amazing if you follow myHowTo.blog. To follow leverage on

  • Click to follow me on Twitter
  • Bookmark this page and comeback from time to time

Help and Comments

I am really looking forward for you to contact me if for example you found a better option or other idea then in this how to. Also, please touch base if you found an error or anything not working or if you have something that you would love to be added to this how to. Simply click this link to touch base with me.

Linking and Recommending the HowTo or the myhowto.blog

I would love to see you are recommending this how to or link it to your website. Also, I would love if you link or recommend the whole myhowto.blog. Please feel free to do so! In case you like to touch base regarding this topic with me, then simply click this link. I look forward!