Thursday, 18 October 2012

Accessing the Raspberry Pi Remotely ssh and vnc

There are several ways to do this. The easiest of these is using ssh to connect. This gives you access to the machine in the form of a command line.
On my laptop I have a ssh program. There are many on the market that will do this Putty being one that comes to mind. It is free and works on most platforms. It needs to be installed on your windows PC or Mac.

Once this is installed you are ready to connect. On the Raspberry Pi enter the command ip addr show

In the box I have highlighted the address that is shown. In my case it is

All my machines on my network start with the number 192.168.1
Each different machine on your network has a unique number in the range 1 to 254. I don't have 133 computers, it was just the number my router chose.

In the ssh program connect and type in the ip address. You need to put in a login mine is the default that came with the raspian wheezy OS. I am prompyted for the password and there I have a working command line.

The actually see what is going on it is better to use VNC. There are other alternatives such as Teamviewer but this doesn't work yet and Chrome Desktop remote through a browser such as Chromium ( you can use Chrome yet). Chromium is the open source version of Chrome. It works well on the Pi.

Setting up a VNC Server
  1. sudo apt-get install tightvncserver
  2. tightvncserver
  3. vncserver :2 -geometry 1024x728 -depth 24
  4. Install tightvnc on the Desktop
In the remote host type in your ip address of the raspberry pi mine was

Follow this with :5902
The number is :590x where x is the number you typed in when you did vncserver :2 -geometry 1024x728 -depth 24 on the Raspberry Pi,
ie vncserver :2

So in the box I type
You are prompted for the password and then you are given a Raspberry pi screen. Note this one is different to the one on the TV. This is not a remote desktop, this is using two "terminals" on one computer.

No comments:

Post a Comment