SSH Connection to Access a Remote Raspberry Pi

Table of Contents

With a secure SSH connection, it is very easy to connect from a command line to a Raspberry Pi from another computer and even from a smartphone or tablet. By activating the secure SSH connection, you can access from any computer in your network and leave your Pi quietly in its box.


Having an SSH connection is really handy, not to say mandatory if you want to program with Node-RED (add new packages without having to turn on the screen …), perform maintenance operations of a Home Automation server, update the linux distribution … quietly from your sofa.

Enable SSH connection on Raspbian

The easiest way to enable the SSH connection on Raspbian is to open the Raspberry Pi Configuration Utility found in Menu -> Preferences

In the interfaces tab, enable SSH

raspbian raspberry pi activer connexion ssh

Restart the Pi for the change to take effect.

Once restarted, open a Terminal and run the ifconfig  command. Locate the ip address of your Pi according to the connection you are using. If you are on WiFi, it is on the second line next to wlan0.

raspberry pi ifconfig domoticz adresse ip serveur

Find the ip address under linux with the ifconfig command.

Access SSH from Mac OS X or Linux

On Mac OS X (or Linux), open a Terminal and run


If you have not changed the default password for the ft user, enter raspberry.

Another solution is to use the name of Raspberry which is automatically published on the local network (mDNS name) at startup by Raspbian. By default the name is raspberrypi.

The ssh command will be

ssh pi@raspberrypi.local

Accessing SSH from Windows

To access your Pi from Windows, the simplest and use Putty, which is open-source and free. It is available here. This is a very simple program that does not require any. By default, the SSH connection uses port 22.

putty client ssh windows

Impossible to connect

Changing the distribution is as simple as changing the SD board and restarting the Raspberry Pi. Yes, but Pi is probably going to keep the same IP address. In this case, the SSH connection will be refused because the authentication key is different (it is generated on the first connection). No problem, just go to the SSH installation directory and delete the known_hosts file.

On Mac OS X or Linux, it is located in the ~/.ssh  directory

cd ~/.ssh

Then, to delete it, run the following command in the Terminal. Without the sudo, the command will be refused.

sudo rm known_hosts

On Windows, it’s a little more complicated. The key is stored differently depending on the software used. Putty, for example, stores the key in the registry under HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\SshHostKeys. To remove it, run regedit then make a search to locate it then right click (delete) to delete it.

Source :

From an iPhone or iPad

There are dozens of customers for iPhone and iPad. ITerminal is simple and does the job very well. It is funded by advertisements that are not too intrusive (just in a banner at the bottom of the screen). It keeps the list of the last servers to which you have connected. A tap on a line and the connection is done automatically, it’s pretty nice to use.

iterminal ios client ssh iphone ipad

From an Android device

Just like on iOS, it’s not the customers that are missing on Android. JuiceSSH (link to the Play Store) seems to be a very good software according to the test realized by

Click to rate this post!
[Total: 0 Average: 0]

Thanks for your reading

Did you like this project ? Don't miss any more projects by subscribing to our weekly newsletter!

Are you having a problem with this topic?

Maybe someone has already found the solution, visit the forum before asking your question

We will be happy to hear your thoughts

Leave a Reply

Read more
DIY Projects
DIY Projects