Amazon Product List

If you are planning on purchasing any of the items listed here from Amazon, please use the links below. Using these links will provide a small contribution to maintain this site at no additional cost to you. Thank You for your support.

  • Diversitech® WS-1 - Wet Switch Flood Detector
    Diversitech® WS-1 - Wet Switch Flood Detector
  • Twine Portable Wi-Fi Sensor + Full Sensor Package
    Twine Portable Wi-Fi Sensor + Full Sensor Package
  • Getting Started with Raspberry Pi
    Getting Started with Raspberry Pi
  • Edimax EW-7811Un 150 Mbps Wireless 11n Nano Size USB Adapter with EZmax Setup Wizard
    Edimax EW-7811Un 150 Mbps Wireless 11n Nano Size USB Adapter with EZmax Setup Wizard
  • Airlink Fully compatible Wireless N 150 Ultra Mini-USB Adapter (AWLL5099)
    Airlink Fully compatible Wireless N 150 Ultra Mini-USB Adapter (AWLL5099)
  • SB Clear Raspberry Pi Enclosure
    SB Clear Raspberry Pi Enclosure
  • Raspberry Pi User Guide
    Raspberry Pi User Guide
  • Onsite Pro FS1NPTW Whole Home Wireless FloodStop with 1 Inch Valve
    Onsite Pro FS1NPTW Whole Home Wireless FloodStop with 1 Inch Valve
  • Floodstop Washing Machine Valve Shutoff Kit
    Floodstop Washing Machine Valve Shutoff Kit
  • Onsite Pro FS3/4H Washing Machine FloodStop with Straight Valves
    Onsite Pro FS3/4H Washing Machine FloodStop with Straight Valves
  • Aqua Managers - FS 1 1/4-NPT - Floodstop for Water Heaters Water Leak Detection System - White - 1.25 in. pipe
    Aqua Managers - FS 1 1/4-NPT - Floodstop for Water Heaters Water Leak Detection System - White - 1.25 in. pipe
  • Floodstop Individual Water Appliance Additional Water Sensor XS-01
    Floodstop Individual Water Appliance Additional Water Sensor XS-01
  • Furman MP-20 Power Relay Accessory, 20 Amp, Two Outlets, Remote Turn-on from Momentary or Maintained Contact Switches
    Furman MP-20 Power Relay Accessory, 20 Amp, Two Outlets, Remote Turn-on from Momentary or Maintained Contact Switches
  • Furman MP-15 Power Relay Accessory, 15 Amp, Two Outlets, Remote Turn-on from Momentary or Maintained Contact Switches
    Furman MP-15 Power Relay Accessory, 15 Amp, Two Outlets, Remote Turn-on from Momentary or Maintained Contact Switches
  • Watts 500800 Premier Hot Water Recirculation Pump, Blue
    Watts 500800 Premier Hot Water Recirculation Pump, Blue
  • Watt'S Sensor Valve Kit for Hot Water Recirculating Pump (0955801)
    Watt'S Sensor Valve Kit for Hot Water Recirculating Pump (0955801)
  • Kicker 10cvt8-2 Shallow 8
    Kicker 10cvt8-2 Shallow 8" Subwoofer 2-ohm 400 Watts
  • Kenwood Kfc-P709Ps 6.5-Inch Performance Series Component Speaker System
    Kenwood Kfc-P709Ps 6.5-Inch Performance Series Component Speaker System
  • Metra 70-2002 Radio Wiring Harness for Saturn 00-05
    Metra 70-2002 Radio Wiring Harness for Saturn 00-05
  • Metra Reverse Wiring Harness 71-2002 for Select 2000-2005 Saturn Vehicles OEM Radio
    Metra Reverse Wiring Harness 71-2002 for Select 2000-2005 Saturn Vehicles OEM Radio

Contributions

Contributions are very much appreciated and are used to host this website and continue to fund new DIY home automation projects. Thank You for your support.

Wednesday
Aug152012

Raspberry Pi - Enabling SSH for Remote Access

For some applications you may not want your Raspberry Pi permanenenty attached to a monitor and keyboard or perhaps you just would like to be able to access your Raspberry Pi remotely.  Enabling the SSH server on your Raspberry Pi will provide SSH terminal access over your network.  This article will cover the steps need to enable the SSH server for remote access and how to connect to the Raspberry Pi using a SSH terminal enumation software from Windows and Mac OSX.  

Enable SSH Server on Raspberry Pi    

NOTE:  

If you are running the Raspian "Wheezy" image or the Debian "Wheezy" image, please note that SSH is already enabled by default.  You can also use the Raspberry configuration utility to enable/disable the SSH server by running the command and selecting the SSH item from the menu: 

sudo raspi-config 

 
You can skip this section and proceed to the next section in the article.

From the console on the Raspberry Pi please enter the following two commands:

sudo rm /etc/ssh/ssh_host_*
sudo dpkg-reconfigure openssh-server

These steps will create the RSA and DSA encryption keys enable the SSH server.  The SSH server will also be started automatically each time you reboot your Raspberry Pi.  

Now, lets get connected.

Getting the IP Adrress from your Raspberry Pi    

Before we can connect remotely, we first need to determine what the IP address is for the Raspberry Pi.  For most users, when the Raspberry Pi boots up and is connected to you router/switch/residential gateway it will dynamically obtain an IP address using DHCP.  

Use the following command from the console to get the IP adress:

ifconfig

In the resulting output on the screen, look for the inet add for the eth0 device.

Connect from Windows

You can use any terminal emulation software you like; however, for this demonstration we will use Putty a very popular an free terminal software for Windows.

You can download the Putty software here.

Double click the putty.exe program to start Putty.  You will be prompted with the Putty configuration dialog.  Enter the IP address of your Raspberry Pi in the Host Name field and make sure the the connection type is set to SSH.  

To persist these setting so you don't have to re-enter them every time you start Putty, enter a name such as "RaspberyrPi" in the Saved Sessions field and press the Save button.

Click the Open button to connect to the Raspberry Pi and start the SSH session.
You will be prompted with a message to cache the RSA2 fingerprint.  Select Yes to accept the key and continue the connection. 

Upon connection, you will need to provide the authentication credentials to logon to the Raspberry Pi. 
The credentials may vary depending on the operating system image that you installed on your Raspberry.  If you loaded Raspian "Wheezy" or Debian "Squeeze" then use username "pi" and password "raspberry".    

Now you can interact with your Raspberry Pi just as if you where setting at the keyboard console.  

Connect from Mac OSX

No additional software is needed for OSX to connect to the Raspberry SSH server.  Just open theTerminal application and enter the ssh command with the username@ip-address format:

ssh pi@10.1.1.194
Upon connection, you will be prompted with a message to permanently accept the RSA fingerprint. Enter "Yes" to accept the key and continue the connection.  Next, you will need to provide the authentication password to logon to the Raspberry Pi.  The credentials may vary depending on the operating system image that you installed on your Raspberry.  If you loaded Raspian "Wheezy" or Debian "Squeeze" then use username "pi" and password "raspberry".   

Upon connection, you will need to provide the authentication credentials to logon to the Raspberry Pi.  The credentials may vary depending on the operating system image that you installed on your Raspberry.  If you loaded Raspian "Wheezy" or Debian "Squeeze" then use username "pi" and password "raspberry".   

Now you can interact with your Raspberry Pi just as if you where setting at the keyboard console.  

 

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments (3)

Hi there,

When I type "ipconfig" in wheazy it does not recognize the command. My WiFi stick is working correctly and connected to my network. Installed putty on my desktop and talk in to the pi via ssh....... What gives here?

December 12, 2012 | Unregistered Commenternigel

@Nigel,

Sorry, that is a Windows command. It should be "ifconfig" ... I have corrected the article. Thanks for catching this.

December 12, 2012 | Registered CommenterRobert Savage

No worries, I was a bit confused that's all. Being a windows guy it seemed too natural to me :-)

December 12, 2012 | Unregistered Commenternigel

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
« Raspberry Pi - Installing Oracle Java Runtime Environment (JRE 1.7.0u4 Embedded) | Main | Raspberry Pi - Getting Started »