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 generate an SSH key and add to authorized_keys

Updated 16th August 2022

In this article we explain how to generate a SSH key for your local machine and add your public key to the authorized_keys on a remote server. Generate an SSH key for Windows, MAC and Linux Note: If you are using Windows, we recommend you use a SSH client like PuTTY. For MAC/Linux run: ssh-keygen

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

Run Python Script on boot

Updated 16th August 2022

Writing your own Shell scripts is a great way to automate your processes. In this post, I will show you how to Run Python Script on boot. This example will be for Raspberry Pi Computers and will run a python script when the device is booted and the user has authenticated. The Python Script we