Setup Raspberry Pi For Remote Access

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.

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

5 thoughts on “Setup Raspberry Pi For Remote Access

  1. vamsi

    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
  2. Jonathon B

    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
  3. Lucretia

    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
  4. Karissa

    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
  5. George Profenza

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

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Are you Robot? *

I don't look at blog comments very often (maybe once or twice a week), so if you have any questions related to multirotor please post it on this forum IntoFPV.com... You're likely to get a response from me faster on there.