Remotely access the Raspberry Pi via SSH

When developing for Raspberry PI you will often need to connect to the Raspberry PI from another computer to deploy code or run tests etc. The best way to do this is via SSH. In this tutorial I will provide instructions on how to enable SSH (Secure Shell) on your Raspberry Pi, which will enable you to remotely access the Raspberry Pi via SSH.

  I will not provide a detailed discussion of the in depth discussion of SSH, but I will give you enough information to enable you to connect to your raspberry pi from another computer.

What is SSH

Secure Shell (SSH) is a command interface and protocol to enable the secure access to a remote computer. It is the tool de jour of network administrators to control linux web and other types of Linux based servers remotely.  SSH essentially enables you to connect to your raspberry pi from another computer and enable you to execute Linux based commands as if you are actually logged onto the computer itself.

This type of approach is handy if you want to code on the Pi from the comfort of your laptop. Using this approach you don’t need to connect your keyboard, mouse or TV to your raspberry pi, all you need to do is connect your raspberry pi to the network,  and you can connect to it.

Although this steps outlined here, are designed to work with raspberry pi, it is important to note that they can be used for any Debian based Linux distribution.

For this tutorial I have made the following assumptions;

  • You are confident with the basics of using the Raspberry Pi, and are able to boot your Pi to the command line
  • Your PI operating system is Raspbian
  • Your PI is already connected to you network
  • you want to connect via SSH to your Pi from another linux based computer.  You able to connect to your Pi via SSH from a windows based computer using an application called Putty ,  but I will not be covering how to use Putty

The first thing we need to do once your PI has started up, is get the IP address of your PI. which we will use later on. So at the command line type in
This command will show all the relevant network configuration for your PI. Your IP will displayed as inet addr. Make a note of this as it will be relevant later.

Install SSH on Raspberry PI

I believe all latest version of Raspbian already has SSH prepackaged, however I am going to err on the side of caution and suggest we just install it anyway.

After the install is complete we’ll start the SSH Service

You are also able to stop and restart this service in a similar way i.e.

The one thing I like to do ensure the SSH service starts every time you boot the PI is use the following command which will update a config setting

You can now restart your PI and disconnect it from your Keyboard & Mouse and television if you choose but leave it connected to you network.

Open a terminal window on your linux desktop and connect to your PI using the IP address we retrieved earlier. Remembering the default username = pi and password = raspberry

You can now start any commands you choose to the PI, and these commands will be executed directly on the PI.

To terminate your SSH session after you have finished simply type exit



The biggest benefit of being able to access your Raspberry Pi via SSH is that you don’t need to have the Pi connected to any screen, keyboards or mice. You Pi effectively becomes a little quiet, low energy consuming, low noise server/computer. As long as it has a network connection you can access it.

Gary Woodfine

Freelance Full Stack Developer at
Helps businesses by improving their technical proficiencies and eliminating waste from the software development pipelines.

A unique background as business owner, marketing, software development and business development ensures that he can offer the optimum business consultancy services across a wide spectrum of business challenges.

Affiliate Disclaimer

Disclosure: Please note that some of the links included in the blog posts are affiliate links, which means I will earn a commission if you decide to make a purchase.

I only include affiliate links to products, services and companies that I have personal experience and have actually used. I only recommend them because they are helpful and useful, not because of the small commissions I make if you decide to buy something.

Please do not spend any money on these products unless you feel they are relevant, suitable and will help you achieve your goals.

Buying anyone of these products and the commisions earned will not make me an overnite multi millionaire, but they will help to cover the hosting costs and compensate for the countless hours and effort I put in to create meaningful and valuable free content I provide to help others succeed.

You've also undoubtedly noticed that I also use various advertising networks - unless of of course you're using an Ad blocker, this is also an attempt to reduce my monthly deficit I experience in providing free relevant, valuable and on occassion insightful content for the benefit of others.

I only really make some money if people click on the ads, unless of course you consider 1c per 1000 impressions real money!

Bear in mind just how many impressions I need to make before I can cover my £20 hosting costs a month!

If you are using an adblocker and guilt stricken you can of course donate using any of the buttons below, but I won't be holding my breath.

Buy me a coffeeBuy me a coffee