One of the best ways to access Kali Linux remotely is by securing VNC connection on Kali Linux with SSH. Using VNC Viewer to provide remote access gives the user a full graphical interface just as if they were actually using the computer or device from home. This article assumes that you already have Kali Linux configured in a way to where you can already access it remotely with VNC Viewer.
If you haven’t setup or configured VNC then you will need to install VNC Viewer on Raspberry Pi with Kali Linux. If you have Kali installed on another device rather than a Raspberry Pi don’t worry because it works the same across other computers or devices. When you have everything configured and you are able to connect remotely to Kali via VNC Viewer you will need to learn how to setup SSH server on Kali Linux.
SECURING VNC CONNECTION ON KALI LINUX WITH SSH – USING PUTTY
If you can successfully connect remotely to Kali with VNC Viewer and you have SSH enabled and configured we can move on to the next step. You should already have Putty downloaded since it is needed to connect to Kali via SSH. Go ahead and open up Putty.
The first thing you need to do is to enter your IP address and port number in Putty. If you do not know your IP address you can use the “ifconfig” command in a terminal session in Kali. If you plan on connecting remotely to Kali Linux from outside of your network you can find your IP address by using IP Lookup. After you locate your IP address you need to enter the port number. The default port number for SSH is 22. If you configured SSH to change the default port then you would use that number.
the default port number for ssh is 22
The next process for securing VNC connection on Kali Linux with SSH is to navigate to “Tunnels” which you can find on the left hand side under “Category“. “Tunnels” is under Connection > SSH > Tunnels. When you click on “Tunnels” you will need to enter the source port and destination.
VNC by default uses port 5900 so you can enter that into the “Source port”. For the destination you need to enter your IP address, followed by a colon (:), followed by the port number again (5900). After you have entered these credentials you can click the “Add” button. Then click the “Open” button.
You should then see a window pop-up that asks you for your login credentials. Enter your login credentials to connect to Kali Linux remotely via SSH.
Next you will need to open VNC Viewer. You should already have this downloaded and installed on the computer or device you are using to connect remotely to Kali Linux. When you have it open you need to enter your IP address, followed by a colon (:), followed by the port number (5900). Then click “Connect“.