New Customers: 50% OFF Your First Month on All VPS Servers & Web Hosting Plans!

Using the VNC console to reach a VPS you cannot SSH into

When SSH stops working on your VPS, the VNC console gives you a direct login so you can diagnose the problem and fix it. This guide walks through checking SSH status, validating configuration, restarting the service safely and adjusting firewall rules.

Rhys CallowayLinux VPS, servers, security and the command line 9 min read Updated 23 Sep 2026 AlmaLinux 9, Ubuntu 24.04

Answer

Use the Virtualizor VNC console to get on to the VPS when SSH will not connect. It opens a browser-based console so you can log in locally, fix the SSH service, adjust the firewall or undo network changes. If the system will not boot cleanly, use Virtualizor Rescue Mode or boot from an ISO. Treat “Re-Install OS” as destructive.

Before you start

  • You reach the VNC console in Virtualizor. Log in to your Hostworld client area at portal.hostworld.uk (WHMCS), open your VPS, then use the Virtualizor option to launch the HTML 5 VNC client.
  • Keep the VNC console open while you test SSH changes. A bad SSH configuration or firewall rule can lock you out over the network. The console is your safety net.
  • Have your VPS login to hand. If you do not know it or cannot reach Virtualizor, open a support ticket.
  • Ubuntu 24.04 uses socket-activated OpenSSH and listens on IPv4 by default. Changing the SSH port on Ubuntu 24.04 and newer needs a “daemon-reload” and a restart of the socket to take effect.
  • AlmaLinux 9 enforces SELinux by default. Moving SSH to a non-standard port needs an SELinux port mapping update or sshd will not bind the new port.
  • Firewalls differ by OS. Ubuntu uses UFW. AlmaLinux uses firewalld. Enabling UFW before allowing SSH will block new SSH connections if defaults deny.
  • Remote network edits can cut you off. On Ubuntu, use “netplan try” for a timed rollback. On AlmaLinux, bringing NetworkManager connections up can interrupt networking. Make changes from the console.
  • Virtualizor provides Rescue Mode and ISO booting for recovery. These are for repair or data recovery. Be careful when mounting filesystems. Double-check device names before writing anything.
  • Reinstalling the OS in Virtualizor wipes the VPS. Confirm backups first.

Step 1: Open the VNC console in Virtualizor

This gives you a keyboard and screen on your VPS even if the network is down.

  • Log in to portal.hostworld.uk and go to your VPS. Launch the Virtualizor HTML 5 VNC client. In Virtualizor it is labelled “Launch HTML 5 VNC Client”.
  • Log in on the console with your usual credentials. If you cannot launch VNC or cannot log in, open a support ticket.

If you need a click-by-click for the Virtualizor console itself, see our summary below and then move on to the detailed How-to from our VPS section. We keep the click path up to date there.

Step 2: Check the SSH service status

Start by seeing whether the SSH daemon is running and what it last logged. This confirms if you are dealing with a stopped service, a bad configuration or something else.

AlmaLinux 9

To see the sshd service status:

sudo systemctl status sshd.service

This shows whether sshd is active and recent log lines.

To follow live logs from sshd:

sudo journalctl -fu sshd.service

This tails the sshd logs so you can see fresh errors as they occur.

Ubuntu 24.04

To see the state of the on-demand SSH unit and its socket:

sudo systemctl status ssh.service
sudo systemctl status ssh.socket

This shows whether the ssh service is healthy and whether the socket that activates it is listening.

To follow live logs from the SSH service:

sudo journalctl -fu ssh.service

This tails the SSH server logs for troubleshooting.

Step 3: Validate SSH configuration before restarting

Confirm that your SSH configuration parses. Restarting with a bad file closes the door on you.

AlmaLinux 9

To syntax-check sshd configuration without restarting:

sudo sshd -t

This prints nothing on success. Any output describes the error and the file and line.

To view the full effective configuration that sshd will use:

sudo sshd -T | less

This lists sshd’s computed settings so you can confirm options like Port or PasswordAuthentication.

Ubuntu 24.04

To syntax-check the OpenSSH server configuration without restarting:

sudo sshd -t

This ensures your config is valid before you touch the service or socket.

To see the effective configuration including settings from snippets:

sudo sshd -T | less

This accounts for values from /etc/ssh/sshd_config and any files in /etc/ssh/sshd_config.d/.

Step 4: Start or restart SSH safely

Only restart once syntax checks pass. Keep your VNC console open while you test a new SSH session from elsewhere.

AlmaLinux 9

To start or restart sshd:

sudo systemctl restart sshd.service
sudo systemctl enable sshd.service

The first command restarts sshd. The second ensures it starts at boot.

Ubuntu 24.04

On socket-activated SSH, restarting the socket ensures port and ListenAddress changes take effect:

sudo systemctl daemon-reload
sudo systemctl restart ssh.socket
sudo systemctl restart ssh.service

The first command reloads systemd units if you changed unit files. The second restarts the socket so the new port is listened on. The third restarts the service if it was already running.

Step 5: Fix firewall rules for SSH

Blocking at the VPS firewall is a common cause. Allow SSH before enabling a deny-by-default firewall.

AlmaLinux 9 (firewalld)

To allow SSH and make it persistent:

sudo firewall-cmd --permanent --add-service=ssh
sudo firewall-cmd --reload
sudo firewall-cmd --list-all

The first command opens the ssh service in the default zone. The second applies changes. The third shows what is allowed now.

Ubuntu 24.04 (UFW)

To allow SSH via the OpenSSH profile and then enable UFW if you use it:

sudo ufw allow OpenSSH
sudo ufw status verbose
sudo ufw enable

The first command creates an allow rule for SSH. The second shows current rules. The third enables UFW if it was off. Allow SSH before you enable it.

Step 6: Confirm the port and address sshd is listening on

Match what the server is listening on to what you are connecting to. This catches typos and port changes.

AlmaLinux 9

To see which TCP ports are open for sshd:

sudo ss -tlnp | grep ssh

This lists listening sockets for the sshd process. Check the port and address.

Ubuntu 24.04

To check the listening port and address on Ubuntu’s socket-activated SSH:

sudo ss -tlnp | grep ssh

This confirms which port and IP sshd is bound to. Ubuntu 24.04 defaults to IPv4 listening.

Step 7: Apply port changes correctly

If you changed the SSH port, make sure the service and the OS agree. Otherwise sshd fails to bind or continues to listen on the old port.

AlmaLinux 9

To permit a new SSH port under SELinux so sshd can bind it:

sudo semanage port -a -t ssh_port_t -p tcp 2222 || sudo semanage port -m -t ssh_port_t -p tcp 2222
sudo systemctl restart sshd.service
sudo ss -tlnp | grep ssh

The first command adds the SELinux mapping for port 2222, or modifies it if it exists. The second restarts sshd. The third verifies the new listener.

Ubuntu 24.04

To apply an SSH port change on a socket-activated setup:

sudo sshd -t
sudo systemctl daemon-reload
sudo systemctl restart ssh.socket
sudo systemctl restart ssh.service
sudo ss -tlnp | grep ssh

The first command checks your sshd configuration. The next two commands reload systemd units and restart the listener socket so the new port is active. The last command confirms the port.

Step 8: Resolve configuration overrides on Ubuntu

On Ubuntu, snippets in /etc/ssh/sshd_config.d can override your main sshd_config. Cloud images often ship a 50-cloud-init.conf file with defaults.

AlmaLinux 9

To review the main sshd configuration file for unexpected directives:

sudo editor /etc/ssh/sshd_config
sudo sshd -t
sudo systemctl restart sshd.service

The first command opens the configuration so you can inspect it with your preferred editor. The second validates the syntax. The third restarts sshd if valid.

Ubuntu 24.04

To check for and adjust overrides provided by cloud-init or other packages:

sudo editor /etc/ssh/sshd_config.d/50-cloud-init.conf
sudo editor /etc/ssh/sshd_config
sudo sshd -t
sudo systemctl restart ssh.socket
sudo systemctl restart ssh.service

The first two commands open the snippet and the main file so you can align them. The third command validates syntax. The last two apply the change on a socket-activated setup.

Step 9: Unban your IP if Fail2ban blocked you

Too many failed logins can trigger a ban. Unban your current public IP while you investigate.

AlmaLinux 9

To check Fail2ban status and unban your IP for the sshd jail:

sudo fail2ban-client status
sudo fail2ban-client set sshd unbanip YOUR.PUBLIC.IP

The first command lists active jails. The second removes your IP from the sshd jail ban list.

Ubuntu 24.04

To view Fail2ban and unban for SSH on Ubuntu:

sudo fail2ban-client status
sudo fail2ban-client set sshd unbanip YOUR.PUBLIC.IP

Replace YOUR.PUBLIC.IP with the address you are connecting from.

Step 10: Recover from broken networking safely

If SSH problems trace back to network changes, use tools that provide a rollback to avoid locking yourself out.

AlmaLinux 9

To apply a NetworkManager connection change knowing it may interrupt traffic:

sudo nmcli connection up <connection-name>

This brings a connection up and can momentarily disrupt networking. Make such changes from the console and plan a maintenance window if needed.

Ubuntu 24.04

To test new Netplan configuration with an automatic rollback if you cannot confirm:

sudo netplan try

This applies config and prompts you to confirm. If you cannot, it rolls back after a timeout. When you are sure the change is correct, apply it permanently:

sudo netplan apply

This makes the network change take effect immediately without rollback.

Step 11: Use Virtualizor Rescue Mode if the OS will not boot

Rescue Mode boots your VPS into a Debian-based environment so you can mount the original disk and repair files or recover data. LVM volumes are supported.

  • In Virtualizor, enable Rescue Mode for your VPS and boot into it. Then launch the HTML 5 VNC client to access the rescue shell.
  • Mount your original VPS disk read-only first while you inspect it. Only write changes once you are sure you have the right device.
  • When finished, disable Rescue Mode in Virtualizor and boot back to your normal disk.

If you are unsure which device to mount or what to fix, open a support ticket.

Step 12: Boot from an ISO for repair tools

You can mount an ISO in Virtualizor and set the boot order to CD first. Then stop and start the VPS to boot the ISO. Hostworld allows customers to upload a custom ISO. Use this for rescue tools that you prefer. Availability of specific images in the list is controlled in Virtualizor.

  • Mount the ISO in Virtualizor and set the boot order to CD first. Stop the VPS, then start it to boot from the ISO.
  • Work from the VNC console. Take care not to write to the wrong disk.
  • When finished, unmount the ISO and return the boot order to disk first.

Step 13: Reinstall the OS only if you mean to wipe the server

Virtualizor “Re-Install OS” recreates the VPS with a fresh OS and does not retain previous data. Use this only if you have backups you can restore and you intend to start again.

  • Confirm your backups. Reinstalling is destructive.
  • Use Virtualizor to pick a new AlmaLinux, Ubuntu or Debian image, or your Windows Server licence if you have a Windows VPS. Customers can also upload a custom ISO if they need a particular image.
  • If you want advice before you proceed, open a support ticket.

What next

If you are new to the Hostworld panels and tools, browse our VPS guides for more maintenance and recovery topics. If you are planning a fresh start after recovery, look at our UK and US plans on Linux VPS.

If you get stuck at any point above or the VNC console does not launch for your account, please open a support ticket. Tickets are the fastest way to work on the same VPS record as you.

Common questions

How do I launch the VNC console if I cannot find the button?

The VNC console lives in Virtualizor and is labelled “Launch HTML 5 VNC Client”. You reach Virtualizor by logging in to portal.hostworld.uk and opening your VPS’s management page. If you do not see the option, or the window opens blank, open a support ticket so we can check your VPS and the Virtualizor session.

Can I change the SSH port without losing access?

Yes, with care. Validate the config with “sshd -t”, keep a VNC console open and test from a second terminal before closing the first. On AlmaLinux 9, add the SELinux port mapping with “semanage port … -t ssh_port_t” then restart sshd. On Ubuntu 24.04, run “systemctl daemon-reload” and restart “ssh.socket” so the new port is listened on.

Should I use UFW or firewalld?

Use UFW on Ubuntu and firewalld on AlmaLinux. Allow SSH before you enable a deny-by-default configuration. On Ubuntu run “ufw allow OpenSSH” then “ufw enable”. On AlmaLinux add the ssh service to firewalld with “firewall-cmd --permanent --add-service=ssh” then “firewall-cmd --reload”.

How can I avoid locking myself out when changing network settings?

On Ubuntu, run “netplan try” so the system rolls back if you cannot confirm the change. On AlmaLinux with NetworkManager, bringing a connection up can interrupt networking. Make changes from the VNC console and expect a short loss of connectivity when applying them. Plan a maintenance window if the VPS is in production.

Can Hostworld mount or provide a specific ISO for me?

You can upload a custom ISO in Virtualizor and boot from it by setting CD first in the boot order. If you need us to check availability or assist with a particular image, open a support ticket.