loading

SSH stands for Secure SHell

Its an encrypted network protocol that enables you to access the command line of a device wireless-ly from a remote terminal.

What it means for the raspberry pi is that it doesn't need to be connected with a display or input devices like keyboard and mouse. As long as it is connected to a network, you can put it anywhere (behind a table, above a cupboard, in a drawer) and still be able to use all the sweet features it provides.

Example Scenarios where SSH might be used:

  • Web Server
  • Ambient Lights
  • Whether Station
  • Security System
  • The List can go on and on....

Raspberry Pi being the awesome little computer that it is, almost all its aspects can be controlled through it's command line and thus in turn via SSH. You can control the GPIO pins, run an application, write a program and more without ever being near it.

I am using the Raspberry Pi 2 here as an example but the processor is the same for all the models of the Pi.

Continue reading to see How To Connect To The Raspberry Pi via SSH or watch the video HERE.

Step 1: Ready the Pi and Enable SSH

We need to make sure that the host is ready to accept a SSH connection.

Many of the Operating Systems offer SSH but I'll be using Raspbian since its the most popular.

To see How to Install Raspbian read the Instructables HERE
OR
Watch the video HERE

We need to connect a display as well as a keyboard initially but we won't need them later on after the Pi has been set-ed up.

1. Insert the SD. Connect a display and a keyboard. Connect power and let the device boot up.

2. Login and run the following command in the command line or the terminal.

sudo raspi-config
In Raspbian Jessie you can open the configuration tool from the menu in the desktop environment but the above command still works.

3. Go into 'Advanced Options' and select SSH.

4. Enable it and exit the configuration tool by selecting finish.

Step 2: Give It a Static IP

This Step is not absolutely necessary but is highly recommended.

If the Pi disconnects and reconnects to the network then there is a chance that it's IP Address will change. In case this happens you will have to find it's IP Address again which can be a bit inconvenient.

To see How Give The Raspberry Pi a Static IP check out the Instructables HERE

OR

Watch the video HERE

Step 3: Find the IP Address

The IP Address of a device is it's location on the network. Every device is assigned an IP by the router.

This IP will enable our SSH client to find the Raspberry Pi on the network to connect to it.

To find the IP of the Pi run the following command in the command line or the terminal:

ifconfig

The sequence of numbers in front of 'inet addr:' is the Pi's IP Address. Note this down.

For me the IP was 192.168.137.82 . This will most probably be different for you, so make sure to use your own.

Also note that whenever the Pi connects to the network there is a chance that this IP might change. In this case you will have to repeat this step. To avoid this from happening you should give the Pi a static IP. To do so refer to the previous step.

You can now disconnect the display as well as the keyboard. We won't need them hence forth.

Step 4: Setup the Client

The device which you will use to access the command line of the Raspberry is the client. Make sure that this device is on the same network as your Pi.

For Windows:

  1. Windows requires a SSH Client and the most popular one is PuTTY. Download it from HERE.
  2. It will be an '.exe' file and won't require any installation.
  3. Run the 'Putty.exe' file you downloaded.
  4. Enter the IP address of the Pi that you noted down in the previous step in the text box that says 'Host Name (or IP address)'.
  5. Make sure that the connection type selected is 'SSH'.
  6. Click open.
  7. A window very similar to the command line of the Pi will appear.
  8. You can login with the username : pi and password : raspberry (won't be visible while typing).

You are now successfully SSH'ed into the Pi.

For Mac Or Linux:

It is easier to use SSH with a Mac or any Linux OS.

Open the terminal and run the Command:

ssh pi@<IP address>

Just replace '' with the IP of your Pi.

This is it! Your are Done!


For Android:

Android also requires a SSH client and the Play Store has some good ones. Few of them will be linked below.

ConnectBot : https://goo.gl/qKBdoj

JuiceSSH : https://goo.gl/QVsWlY

SS Client : https://goo.gl/Vpq9t7

All of these work pretty much the same as the PC.

I hope this Instructables was useful for you.
If you have any questions or suggestions, feel free to ask them in the comments.
You can watch the corresponding video HERE
Read my other Instructables HERE
Check out my YouTube Channel at : YouTube.com/LiveSparks
Follow me on twitter at : https://twitter.com/LiveSparking

About This Instructable

1,448views

24favorites

License:

Bio: I am student learning computer science and dig electronics and tech. Follow me on Twitter : https://twitter.com/LiveSparking Check out my YouTube channel : https ...
More by LiveSparks:How To Use SSH with Raspberry Pi 2 How To Assign A Static IP to The Raspberry Pi How to Install and configure Raspbian on Raspberry Pi 2 (Linux/windows/mac) 
Add instructable to: