1 month ago

How to Use VNC to Remotely Access Your Raspberry Pi by different Devices « Null Byte :: WonderHowTo

With VNC, there is actually no need to rely on mundane peripherals like a keyboard, mouse, or monitor to remotely access a computer’s graphical user interface (GUI) as if you were sitting in front of the machine. VNC is actually useful when running a headless machine like a Raspberry Pi, or when you need full access to the GUI on the remote machine, instead of just a terminal.

VNC has been around for decades as well as can be used on a plethora of different operating systems like Windows, macOS, Linux as well as even mobile platforms like Android. Using VNC, you are able to see as well as control the host machine by another device. VNC relays the keyboard as well as mouse functions by your laptop to your headless Pi or remote computer, while issuing graphical screen updates back to your laptop. The end result is actually as though you were sitting behind the screen of your Pi, even if This specific’s miles away.

In our Kali Pi tutorial, we set up the ability to SSH into your Pi, nevertheless This specific doesn’t allow us to run multi-bash programs like Airgeddon which need to open multiple windows to work. There are many reasons to run VNC on your hacking computer, allowing discreet access to a Kali Linux box in environments where a smartphone may be the only tool you can visibly access. Imagine easily creating Evil Twin networks as well as wreaking wireless havoc on your iPhone with the power of a full Kali Linux GUI, connected by VNC to a discreetly placed Raspberry Pi.

Don’t Miss: How to Crack Weak Wi-Fi Passwords in Seconds with Airgeddon on Parrot OS

Because of these benefits, This specific installation will be similar on all various operating systems of which support VNC, which is actually virtually all of them. In This specific tutorial, we will download as well as install the server portion of VNC, configure This specific to start at boot so we don’t have to configure This specific each time as well as then we will install the VNC remote client on remote endpoint device like a mobile laptop or a smartphone.


  • Ethernet cable (optional): An Ethernet cable allows you to bypass wireless authentication by directly interfacing with local networks to which you have physical access.
  • Local Area Network (LAN): This specific might be your Router or Modem if you are in a fixed position, or your phone’s wireless hotspot if you are mobile. In order just for This specific to work, you need to be able to see your device on the same subnet, so ensure of which the Pi has an IP address as well as of which you can ping the Pi’s IP address. If you can’t, This specific may mean you are not able to communicate with different devices on the network due to firewall or network settings.

Step 1: Update & Notes

When we first load up our Kali, we always want to run the apt-get update in a terminal window to ensure of which all our dependencies are up-to-date as well as working properly. Make sure of which the Pi as well as the device you are using to connect to the Pi are on the same network.

Step 2: Install the VNC Server Software

There are various versions of VNC, all with different purposes, nevertheless in This specific tutorial, we will be using TightVNC. Open a command window on your Raspberry Pi as well as type apt-get install tightvncserver This specific will download as well as install the software. When of which is actually complete, type tightvncserver. This specific enables the TightVNC service, as well as This specific will require you to create a password to access by your computer. Go ahead as well as create one right now.

Once you enter a password, This specific will prompt might you like to enter a view-only password (y/n)? Press n, because a view-only password will only allow you to see what is actually displayed on the machine, as well as not be allowed to control This specific. Also, TightVNC can only set up to an 8 character password.

Don’t Miss: How to Create Stronger Passwords

Step 3: Configure TightVNC Server

right now, to be able to access our Pi remotely, we need to run TightVNC at boot. First, we will navigate to the directory by typing cd /etc/init.d. Next, we want to create a startup script, so you can use whatever text editor you prefer, nevertheless I like vi. Anyhow, type vim ~/etc/init.d/vncboot to create the startup script. Next, we want to insert the script below into the blank document.

# Provides: vncboot
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start VNC Server at boot time
# Description: Start VNC Server at boot time.


export USER HOME

case “$1” in
echo “Starting VNC Server”
#Insert your favoured settings for a VNC session
/usr/bin/vncserver :0 -geometry 1280×800 -depth 16 -pixelformat rgb565

echo “Stopping VNC Server”
/usr/bin/vncserver -kill :0

echo “Usage: /etc/init.d/vncboot {start|stop}”
exit 1

exit 0

Don’t Miss: How to Use Vim

After all of of which text is actually in place, we will save as well as quit by hitting the Esc key as well as typing :wq!.

After the document is actually closed, we want to add permissions to This specific completely new startup script by typing chmod 755 /etc/init.d/bootvnc. When of which finishes, we want to add the dependencies to This specific by typing update-rc.d bootvnc defaults. right now let’s reboot the Pi, as well as the VNC module will be added to the startup boot sequence.

Step 4: Download & Install the VNC Client

right now we can use any VNC client we want, nevertheless for Windows as well as iOS, we are going to use RealVNC. So we are going to download This specific by the RealVNC website.

Once This specific is actually downloaded, we want to install This specific. The installation is actually simple, just follow the on-screen instructions.

Then we want to go back into our Pi, open a terminal as well as type ifconfig. Write down the Pi’s local IP address.

Then let’s jump back into our Windows machine as well as open up VNC Viewer, then click File as well as then completely new Connection. right now, let’s add the IP address inside the VNC Server field.You can put any name of which will help you remember This specific device inside the Name field. Press OK to finish as well as save the settings.

Double click on your completely new connection, as well as if successful a window will pop-up saying “The connection to This specific VNC server will not be encrypted.” Because of This specific, This specific is actually not recommended to use This specific outside of your network if you are expecting privacy. Just press the Continue button. Another window will pop up asking for the password we created inside the first step.

Finally, bam! If the connection was successful, you should see a screen like the one below.


right now we can work on our Pi without the need for a separate keyboard, mouse, as well as monitor. These steps will apply mostly to all of RealVNC Client as well.

Don’t Miss: Turn Any Phone into a Hacking Super Weapon with the Sonic

On an iPhone, your display will look something like below.


This specific is actually just one basic foundation of the toolset of which compliments our hacking environment. In practice, VNC allows us to more quickly access our hacking computer by any device we have handy, allowing us to deploy Kali Linux tools inside the most inconspicuous way possible.

If you have any questions, you can leave a comment here or send a message on Twitter at @Nitroux2. Stay connected as well as check out our social media accounts!

Cover photo as well as screenshots by Nitrous/Null Byte

Leave a Comment

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

12 + 18 =