Raspberry Pi ssh connection

Fourth dimension needed:5 minutes.

If you demand to take command over your Raspberry Pi remotely, without having the demand to have a desktop surround, an SSH connection is a fast, easy and secure solution. This tutorial will guide you how to establish an ssh connection between your Raspberry Pi and your computer.

A Secure Beat out (SSH) is a network protocol that allows you to send commands to your Raspberry Pi remotely. As the Raspberry Pi is oftentimes used as a server, it is very handy to be able to communicate from your desktop to your Pi without having to connect a display and keyboard. If you want more information nigh ssh, visit the 'Secure Shell' Wikipedia page.

With an SSH connection you'll accept admission to your Raspberry Pi through a 'Terminal window' environment. For quite some applications this type of connection volition be enough. Still, connecting via SSH doesn't permit a remote desktop environment, which could be necessary for some applications. Have a wait at our tutorial 'How to admission your Raspberry Pi with a remote desktop connection' if y'all desire to know how to setup a remote desktop connexion with your Pi.

Let's kickoff to setup the ssh connection now …

  1. Enable ssh on your Raspberry Pi

    Before beingness able to access your Raspberry Pi via an ssh connection you need to enable the ssh interface at your Pi kickoff. If you try to setup a ssh connection without having enabled ssh, yous'll get a 'Connection refused' message. There are 2 easy ways to enable ssh :

    a. Method with display or with desktop surroundings
    On your Raspberry Pi, open: applications card > Preferences > Raspberry Pi Configuration as shown in the film below.

    Raspberry Pi raspi-config
    Once the Raspberry Pi Configuration window opened, click on the tab "Interfaces". Select here "Enabled" in front of SSH.

    Raspberry Pi enable SSH
    b. Method without display or without desktop environment
    If you don't have a display or if you installed the Raspberry Pi OS Lite version (without desktop environment) you demand to remove the SD-card from you Pi and insert information technology into your reckoner. Don't worry if an error message appears, just ignore it.

    Add now a new blank file named 'ssh' in the 'boot' directory equally you tin see beneath. Make sure there is no extension equally '.txt' for instance. And get out the content of the file empty.

    Raspberry Pi boot ssh file
    That's it for the second method. Yous can now remove the SD-card from your computer and put information technology back into your Raspberry Pi. The ssh-functionality will be enabled on the next boot.

  2. Detect out your Raspberry Pi's IP accost

    Be sure your Pi is continued to your LAN before standing with the next step.

    a. Method with brandish or with desktop surroundings
    You can observe the IP accost past hoovering (do not click) over the network icon (right upper corner of your screen).

    raspberry pi network icon IP address
    b. Method without display or without desktop surroundings
    If you don't have a desktop environs, you'll have to search your Pi'south IP-address into the spider web app of your router (look for fastened devices or something like). And if you don't have access to your router, you can use a tool similar 'Advanced IP Scanner' to see the used IP-addresses of your network.

  3. Open a terminal window or command prompt on your computer and ssh into your Raspberry Pi

    OK, nosotros are ready at present to establish an ssh connexion from any computer connected to the aforementioned LAN as your Pi. For this, open a Terminal window (for Mac and Linux) or a Control Prompt window (for Windows ten and 11 systems). And enter the following command :
    ssh [email protected]
    The default username is 'pi', replace it if you changed the username.
    And supervene upon the X.XXX with the actual IP address of your Pi.

    ssh first connection message
    The get-go time you connect to your Pi, yous'll get a warning message equally shown above. In essence it tells yous that you lot never connected to this server and asks y'all if it's OK to continue. Just enter 'aye'.

    So you'll be asked for a countersign. The default password for the user 'pi' is 'raspberry'.

    ssh connected to Raspberry Pi
    That's all. You can now admission your Pi remotely in the same way you would open a terminal window straight on your Pi.

  • To shut your ssh-session properly, just type 'exit'.
  • If your password is still the default password 'raspberry', your Raspberry Pi is really vulnerable (we strongly recommend to alter yous password ASAP).
  • If you try to setup a connection with an IP address yous previously used for an earlier ssh connexion, you'll get an mistake message. This tin can be the case when you supervene upon your Pi with another one and want to keep the same IP address for case. Solve this issue by deleting the line offset with the IP address you desire to use in the 'known_hosts' file. This file is stored on your C-bulldoze. On my Windows x calculator this file is located in the directory 'C:\Users\Frederic\.ssh'.
  • Raspberry Pi Pico starter kit

    Raspberry Pi Pico starter kit

    33.62 37.49

  • Raspberry Pi4 SSD case fan

    Raspberry Pi four case with SSD slot and SATA cable

    17.11 21.97

    Rated 5.00 out of five based on 1 customer rating

  • Raspberry Pi4 SSD case fan

    Raspberry Pi 4 kit with 120 GB SSD

    137.seventy 171.23

  • Raspberry Pi 4B Ultimate Starter Kit

    Raspberry Pi iv Ultimate starter kit

    118.46 150.89

  • Raspberry Pi4B starter kit

    Raspberry Pi 4 starter kit

    94.16 128.88

find out more products

Exist the start to be informed nigh our latest tutorials and products by subscribing to our Newsletter