Reboots, Reinstalls & Console

How to Connect to VPS via VNC

By the Domain India teamPublished 7 min read
Knowledge base article
Contents (7 sections)

"Connecting to a VPS via VNC" can mean two different things: using a provider's out-of-band console to reach your server when SSH is broken, or running a graphical desktop on your own VPS and viewing it with a VNC client. This guide explains both, what to do if you are locked out of a Domain India VPS, and how to run a VNC desktop safely over an SSH tunnel.

Key takeaways

Day-to-day, a Linux VPS is managed over SSH, not VNC. The Domain India client area has no VNC or web console for your VPS, so if you are locked out of SSH, open a support ticket with the server's IP address and what you changed last; support handles start, stop, force restart and reinstall requests. If you want a graphical desktop, install a desktop and a VNC server on your own VPS, bind it to localhost, and connect through an SSH tunnel; never expose a VNC port to the internet.

1. Console, SSH or VNC desktop?

MethodWhat it gives youWhen to use it
SSHA command-line session over the network, as root or another userEveryday administration of a Linux VPS
Provider consoleThe server's screen and keyboard as if you were sitting at it, even with networking brokenNot available in the Domain India client area; open a ticket instead
VNC desktop you installA graphical desktop session running inside your VPSRunning a desktop application or browser on the server

A console is part of a hosting platform; a VNC desktop is software you install and look after yourself on your own server. On a Domain India VPS there is no console button in the client area, so SSH is your way in, and support is your way back in if SSH stops working.

2. Everyday access: SSH

A Domain India VPS is self-managed and comes with full root access over SSH. The root login details are sent by email when the server is set up. For connecting from Windows, macOS or Linux, see how to connect to your VPS with SSH, and before you do anything else, work through the SSH security hardening checklist: key-based login, no password logins, and a firewall.

3. Locked out of SSH?

Most lockouts come from a firewall rule, an SSH configuration change or a server that ran out of memory. Work through these first:

  1. Check the address and port.
    Make sure you are connecting to the VPS IP address from your welcome email, and to the SSH port you configured if you changed it from 22.
  2. Test from another network.
    Try a mobile hotspot. If that works, your own IP address may be blocked by the server's firewall or by an intrusion-prevention tool such as Fail2ban.
  3. Check your key.
    If you switched to key-only login, make sure you are using the matching private key (ssh -i ~/.ssh/id_ed25519 root@your-vps-ip).
  4. Open a ticket.
    If the server still refuses connections, open a ticket with the VPS IP address and what you changed last. There is no console in the client area to fix it from yourself; support handles start, stop, force restart and reinstall requests through the ticket. A reinstall erases the server, so keep your own backups.
Avoid the next lockout

Before changing the firewall or sshd_config, keep your current SSH session open and test the new setting from a second terminal. Only close the first session once the second one logs in.

poweroff leaves the VPS switched off

Use reboot to restart from inside the server. Running poweroff or shutdown -h turns the VPS off, and it stays off until support starts it again from a ticket. See managing your VPS.

4. Run a graphical desktop on your VPS with VNC

This part applies to your own VPS only. On shared hosting you can't install system software. The example uses Ubuntu 24.04 LTS with the lightweight XFCE desktop and TigerVNC. A desktop uses memory, so a plan with at least 2 GB of RAM is sensible.

Install the desktop and the VNC server, as root:

bash
apt update
apt install -y xfce4 xfce4-goodies dbus-x11 tigervnc-standalone-server
adduser deskuser

Then, as the new user (never run the desktop as root), set a VNC password and tell the VNC server to start XFCE:

bash
su - deskuser
vncpasswd
mkdir -p ~/.vnc
printf '#!/bin/sh\nunset SESSION_MANAGER\nunset DBUS_SESSION_BUS_ADDRESS\nexec startxfce4\n' > ~/.vnc/xstartup
chmod +x ~/.vnc/xstartup
vncserver :1 -localhost yes -geometry 1600x900

Display :1 listens on port 5901, and -localhost yes means it accepts connections only from the server itself. Stop it with vncserver -kill :1.

5. Connect through an SSH tunnel

On your own computer, open a tunnel from local port 5901 to the VNC server:

bash
ssh -L 5901:localhost:5901 deskuser@your-vps-ip

Leave that session open, start a VNC viewer such as TigerVNC Viewer, RealVNC Viewer or Remmina, and connect to localhost:5901. Enter the VNC password you set. Everything between your computer and the VPS travels inside the encrypted SSH connection.

On Windows, PuTTY can create the same tunnel under Connection › SSH › Tunnels: source port 5901, destination localhost:5901.

6. Keep VNC secure

  • Never open VNC ports to the internet. VNC passwords are short and the protocol is often unencrypted; exposed VNC servers are scanned and attacked constantly. Keep -localhost yes and don't add firewall rules for ports 5900-5999.
  • Use a separate desktop user, not root.
  • Stop the session when you are not using it, to save memory and reduce exposure.
  • Keep the system updated with apt update && apt upgrade.

7. Domain India VPS

Domain India VPS plans run on KVM with NVMe storage and full root access. They are self-managed: you install and maintain the software, including any desktop or VNC server. cPanel is not offered on VPS; the panel options at checkout are none, CyberPanel, Webuzo or DirectAdmin. Compare plans and live prices on the VPS page.

Support is on 24/7 live chat, and tickets get a first response within 15 minutes; there is no phone support.

How do I connect to my Domain India VPS?

Over SSH, using the IP address and root login details emailed when the VPS was set up. Use an SSH client such as the ssh command on macOS, Linux and Windows, or PuTTY on Windows, and switch to key-based login as soon as you can.

Is there a VNC or browser console for my Domain India VPS?

No. The Domain India client area has no VNC or web console for a VPS. Manage the server over SSH, and if you can't get in, open a support ticket with the VPS IP address.

I locked myself out of SSH with a firewall rule. What can I do?

Try connecting from another network in case only your IP is blocked. If the server still refuses connections, open a support ticket with the VPS IP address and what you changed. Support handles start, stop, force restart and reinstall requests through the ticket.

How do I get a graphical desktop on a Linux VPS?

Install a desktop such as XFCE and a VNC server such as TigerVNC, run the VNC server as a normal user bound to localhost, and connect with a VNC viewer through an SSH tunnel.

Is it safe to open port 5901 on my VPS firewall?

No. Exposed VNC servers are attacked constantly and often use weak, unencrypted authentication. Keep VNC bound to localhost and reach it through an SSH tunnel.

Can I use VNC on shared hosting?

No. Shared hosting does not let you install system software or run a desktop. Use a VPS for that.

Ready to run your own server? Compare plans on the VPS page, or open a support ticket if you are locked out of an existing VPS.

Locked out of your VPS?

Send your VPS's IP address and what you changed last, and support will help you get back in.

Open a support ticket

Ready when you are

Get VPS from ₹552.65/mo + GST

See plans

Was this article helpful?

Your answer helps us decide what to improve next.

Still need help? Open a support ticket and our team will reply.

Prefer an app? Add this site to your home screen.Get the app
Connect to a VPS via VNC Securely (SSH Tunnel Guide)