News Ticker

Connecting to the Pi via SSH

Setting up SSH connection to the Pi is a very good idea if you have only one TV in the house and in any event, it allows you to control to Pi from any PC in the house.

To get started you will need to download an SSH client. I use Putty (www.putty.org).

You will need to know the following IPs which can be obtained by opening up a command line prompt and typing ipconfig. These are the IPs that I use.

  • gateway – 192.168.1.1
  • netmask – 255.255.255.0
  • network – 192.168.1.0
  • broadcast – 192.168.1.255
  • address – 192.168.1.200
  • DNS server – 87.216.1.65/66

Note: the address IP will be the IP of the PI on the network and I have chosen 192.168.1.200.

Now to configure the Pi.

  • Start the Pi
  • Enter the user name: pi and password: raspberry
  • At prompt change to root user by typing: sudo –i
  • Go up one directory to the root by typing: cd ..
  • Edit file /etc/network/interfaces by typing: pico /etc/network/interfaces
  • Comment out the line: iface eth0 inet dhcp and add the IP addresses for: gateway, netmask, network, broadcast and address.
 /etc/network/interfaces

/etc/network/interfaces

  • Save the file
  • Open the file /etc/resolv.conf by typing: pico /etc/resolv.conf
  • Add the DNS servers
    • nameserver 87.216.1.65
    • nameserver 87.216.1.66
  • add google DNS
    • nameserver 8.8.8.8
    • nameserver 8.8.4.4
/etc/resolv.conf

/etc/resolv.conf

  • restart the network by typing: service networking restart
  • ensure that the SSH server is enabled by typing: raspi-config
  • select ssh and enable
  • connect the Pi to your router via the Cat5 cable
  • restart raspberry pi

Now we need to configure Putty to connect to the Pi.

  • Go to your PC and download and install Putty (www.putty.org).
  • Enter the IP address, in my case it is 192.168.1.200 and give the session a name (RaspberryPI) and save it
Putty configuration

Putty configuration

  • Select the saved session, click the Load button to load the session and then click open
  • Enter the user name: pi and password: raspberry
Log into the Pi

Log into the Pi

  • now you are logged into the Pi.
Logged into the Pi

Logged into the Pi

2 Trackbacks / Pingbacks

  1. Connecting to the Pi via SSH « alex.theedom
  2. Connecting to the Pi via SSH « alex.theedom

Leave a Reply