Tag Archives: set up ssh

How to Set Up SSH to Remotely Control Your Raspberry Pi


Connecting your RPi to the outside world: how to connect remotely via the web

A tutorial by D.M. Wiig

Once you have your RPi server up and running there are a few things that you may want to consider if
you are planning to host content to be delivered over the web. Assuming you have successfully connected your
RPi to the outside world, you can save some processing over head by disconnecting the monitor, keyboard and mouse.
You can access your RPi via the web from another computer using the ssh function for Linux systems and a program such
as PuTTY for Windows systems.

To use access your RPi remotely you must first make sure that ssh is enabled on your Pi. You can do this by opening
a terminal on the Pi and issuing the command:

 

$pi@raspberrypi / $ sudo raspi-config

This will invoke the Raspberry Pi Software Configuation Tool. Select option #8, Advanced Options, and then option

A4 SSH Enable/Disable remote command line access to your Pi using SSH

press enter and take the Enable option from the next menu.

If ssh has not been enabled previously reboot your Pi so that the option will be enabled. You should now be able to access your Pi remotely from any computer connected to the web.

If you are using a linux based computer open a terminal program. The following screen shot shows a typical sequence of commands will access your Pi via the web:
—————————-
doug@doug-Satellite-M55:~$ ssh http://www.raspberrypiandr.net -l pi
pi@www.raspberrypiandr.net’s password:
Linux raspberrypi 3.10.25+ #622 PREEMPT Fri Jan 3 18:41:00 GMT 2014 armv6l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Mar 25 21:08:54 2014 from 71-34-171-204.desm.qwest.net
pi@raspberrypi ~ $
——————————–
Substitute your URL after the ssh command. After the -l option use whatever you named your Pi when you initially set it up.
You will asked for a password and should then be logged in and see a command line prompt.

If you are using a Windows based computer system you can one of several free programs that will allow you to remotely access your RPi. One of the most popular is called PuTTY. This program can be downloaded from the web site http://www.putty.org. Once you are sure your
remote connect works correctly you can unplug the monitor, keyboard, and mouse from your Pi, leaving just the power connection and whatever type of internet connection you are using. This will help to cut some of the load from your Pi as it functions serving web pages. To end
your remote session simply type ‘logout’ at the command line and you should see something similar to:

——————————–
pi@raspberrypi ~ $ logout
Connection to http://www.raspberrypiandr.net closed.
doug@doug-Satellite-M55:~$
——————————–

You can now close your terminal program until your next remote session.