Accessing A Headless Raspberry Pi using SSH and TightVNCServer

Scope:

To gain access to a terminal on a headless Raspberry Pi and then to display the Pi’s desktop remotely using tightvncserver and xtightvncviewer

BOM:

– WiFi enabled Raspberry Pi with Raspbian OS

– WiFi enabled computer on same network as Raspberry Pi.

Instructions:

To enable SSH access to the Raspberry Pi:

Note: Newer versions of Raspbian OS have SSH enabled by default. Here are the steps anywaysAccessing A Headless Raspberry Pi using SSH and TightVNCServer

  1. Power on the Raspberry Pi and login using the appropriate credentials.
  2. Launch the Raspberry Pi Software Configuration Tool with the following command:

$sudo raspi-config

3. The Enable SSH option is under the “Advanced Options” sub menu

4. Save settings and reboot as necessary.

To access a terminal on the Raspberry Pi remotely:

1. Determine the IP address of the Raspberry Pi by logging into the administration panel of the router.

2. Issue the following command from the WiFi enabled computer:

$ ssh pi@[Pi's IP Address]

3. Login using the appropriate credentials. A terminal should now appear giving access to the Pi!

With SSH access to the Raspberry Pi computer now established, installing the software required to display desktop on the remote computer becomes simple.

1. Download and install tightvncserver using the following command:

$ sudo apt-get install tightvncserver

2. Launch the VNC server using the following command, and make note of the New: ‘X’ Desktop line:Accessing A Headless Raspberry Pi using SSH and TightVNCServer schematic

3. The VNC server is now running on the Pi and the only thing left is to install a viewer on the PC to connect to it.

Installing the xtightvncviewer.

1. From the command line, install the xtightvncviewer using the following command

$ sudo apt-get install xtightvncviewer

2. Connect to the vncserver running on the Pi by issuing the following command

$ xtightvncviewer [IP Address of PI]:[Port Number shown once VNC server was launched]

3. A remote desktop should now appear giving full graphical access to the Pi!


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

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

Scroll to Top