How to set up SSH on Raspberry Pi

By Dillon Smart · · · 0 Comments

Raspberry Pi

In this post, I am going to show you how to set up SSH on a Raspberry Pi.

Step 1: Raspberry Pi config menu

First, open a new terminal and execute the command below to open the Raspberry Pi config menu.

sudo rasps-config 

Select “Interfacing Options” and press ENTER.

Raspberry Pi Interfacing Options

Then select “SSH” and press ENTER. 

Select “Yes” and press ENTER. You should now see a message:

The SSH server is enabled 

Close the Raspberry Pi config menu by pressing ESCAPE.

Step 2: How to find the Raspberry Pi’s IP address

To connect to the Raspberry Pi over SSH, you’ll need to know the IP address of the Pi. 

Open a new terminal and execute the command: 

hostname -I 

The hostname is a unique name for a computer in a network. By obtaining the hostname, you can now connect to the Raspberry Pi on the same network as your main computer. Make sure you have made a note of the hostname, which will likely be an IP address. 

Step 3: Connect to the Raspberry Pi via SSH 

The steps below work for Linux, macOS, and Windows 10 (October 2018 update or later) via the SSH Client from the terminal. If you are using an older version of Windows, you can download PuTTY. PuTTY is a free implementation of SSH for PCs running Microsoft Windows. 

Finally, we need the username and password of the user on the Pi. By default, the username is Pi however, if you have changed the user, you can check which user you are logged in as by running: 

whoami 

Once you have the username and password, connect to the Raspberry Pi via ssh:

ssh pi@ip-addess

You have now set up SSH on a Raspberry Pi and successfully connected.

Was this post helpful? Please leave a comment saying so!

 

Raspberry PiSSH

0 Comment

Was this helpful? Leave a comment!

This site uses Akismet to reduce spam. Learn how your comment data is processed.

How to setup a remote MySQL database connection in PHPStorm

Updated 1st October 2023

PHPStorm is packed full of features designed to make the development process for PHP developers efficient and streamlined. Although Jetbrains have a standalone product for interacting with databases, named DataGrip, PHPStrom ships with the Database Tools and SQL plugin. This tools is powerful, integrated directly within the IDE, and provides a convinient way to intract

Setting up SSH with BitBucket

Updated 16th August 2022

Setting up your project using a remote repository over SSH can become a painful task for new and even the most seasoned developers. In this article we cover how to set up BitBucket SSH. Repositories not found, incorrect permissions and issues when using your SSH key can all occur, and become very stressful. Below are

How to Upload and Download files to and from a Linux server over SSH

Updated 16th August 2022

Its common place to need to upload and download files to and from a remote Linux server. To upload and download files from a remote Linux server you can use the scp (secure copy) command. To download a file you can use: To upload a file you can use: scp /path/to/file/your/uploading username@ip-or-server-name:/path/to/location/to/upload/to Note: It is