Setup Raspberry Pi For Remote Access

by Oscar

In this article, I will show you how to setup your Raspberry Pi and access it remotely, using SSH for command line access and VNC for GUI access. With successful setup, you can say good bye to the monitor, mouse and keyboard, and you can view and control your Raspberry Pi from your laptop.

Some of the links on this page are affiliate links. I receive a commission (at no extra cost to you) if you make a purchase after clicking on one of these affiliate links. This helps support the free content for the community on this website. Please read our Affiliate Link Policy for more information.

raspberry pi desktop

Setup Raspberry Pi

You can do it following the official document: http://www.raspberrypi.org/downloads

To put multiple Linux system on one single SD card (if you are short in SD cards), you can try this: http://www.berryterminal.com/doku.php/berryboot

Connect to the network

Either using WiFi Dongle, or network Cable, the Raspberry Pi needs to be connected with your laptop somehow.

You will also need to find out the IP address of the Raspberry Pi.

If you have a HDMI connector monitor, connect to the Pi and type in ifconfig in the terminal to find out.

If you don’t, and you are connected to your home network like I do, type in 192.168.0.1 in your laptop browser to get to your router configuration page, and check the network connected devices, you should be able to find a device called raspberrypi.

raspberry pi checking ip

Command Line Remote Access to Raspberry Pi with SSH

This Video explains what is SSH (Secure Shell). It basically gives you access to the terminal of your Linux system from your current work station, in our case, from our laptop to the Raspberry Pi.

To summarize it, download PuTTY:

raspberry pi putty

Enter your IP address and leave everything as it is.

You will be asked for your Raspberry Pi login, the default username and password is

Username: pi Password: raspberry

After you log in, you should be getting this, and now you have remote access to your Raspberry Pi command line!

raspberry pi putty

Desktop (GUI) Remote Access to Raspberry Pi with VNC Server

Setup VNC on Raspberry Pi

See this video first to setup VNC on your Raspberry Pi.

Basically, you will need to install TightVNCServer on your Raspberry Pi first with command line, should be pretty quick, which setup a GUI desktop service that can be accessed remotely from your laptop.

Install tight VNC: sudo apt-get install tightvncserver

Run the program: tightvncserver

Start a VNC session: vncserver :1 -geometry 1024×728 -depth 24

Notes:

  • Configure the session’s resolution after the -geometry argument. In the above 1024x768 is used. The RPi is capable of full HD so you could try 1920x1080.
  • Colour depth is specified by the -depth argument. In the above exampe, 24-bit colour depth is used. You could use 16-bit instead to reduce network traffic.
  • You can start more than one VNC session by running subsequent vncserver commands, just increment the first digit: e.g “vncserver :2 …” for a second, ”vncserver :3 …” for a third.

Setup VNC Client on your Desktop Computer

There are a lot of VNC clients out there, but I used Real VNC.

Connect

With completed setup on both Pi and your laptop, you can now put in the IP in the client. Notice there is a colon and number after the IP, which is the port number you setup on the Pi (see video).

raspberry pi putty

real-vnc2

Leave a Comment

By using this form, you agree with the storage and handling of your data by this website. Note that all comments are held for moderation before appearing.

5 comments

vamsi 16th March 2017 - 1:52 am

hello sir,
i am getting connection refused in putty when i want login.
is there any solution for this?
hope you reply ASAP

thankyou.

Reply
Jonathon B 25th October 2015 - 4:38 pm

Hi Oscar
I got a “vncserver: geometry 1024×728 is invalid” error when try to set up the server on raspberry pi, can you help.

PS. Raspberry Pi A+ with Wi-Fi dongle/ USB thing

Reply
Lucretia 21st December 2013 - 6:12 am

wonderful issues altogether, you simply received a new reader.
What may you suggest about your put up that you made a few days in the past?
Any certain?

Reply
Karissa 23rd November 2013 - 7:59 pm

I am extremely impressed with your writing skills and also with the layout on your blog.
Is this a paid theme or did you customize it yourself?
Either way keep up the nice quality writing, it’s rare to see
a nice blog like this one today.

Reply
George Profenza 13th September 2013 - 4:27 pm

Really well explained article. What’s the easiest way to make sure the vnc server starts when the raspberry pi boots ?

Reply