Table of Contents
What you will read?
First, make sure you already have:
-
A VNC server (like TigerVNC) installed and configured on your Linux machine
-
A desktop environment installed (XFCE, GNOME, etc.)
-
PuTTY installed on your Windows system
Step 1: Connect to Linux via PuTTY
Open PuTTY and enter your server IP address or hostname.
Use port 22, then click Open.
Log in with your Linux username and password.
Step 2: Start the VNC Server
Once logged in, you can start the VNC server like this:
vncserver :1
This starts the server on display 1, which maps to TCP port 5901 (5900 + display number).
If it’s your first time, you’ll be prompted to set a VNC password:
vncpasswd
To kill the session later:
vncserver -kill :1
If you want to specify resolution or depth:
vncserver :1 -geometry 1280x800 -depth 24
Step 3: (Recommended) Tunnel VNC Over SSH with PuTTY
VNC is not encrypted by default, so tunneling over SSH is a good idea.
-
In PuTTY, go to
Connection > SSH > Tunnels -
In Source port, enter:
5901 - In Destination, enter:
- Click Add, then go back to Session and click Open
Now you can connect your VNC Viewer to:
localhost:5901
This will securely forward your local VNC client to the remote server.
