Imagine enabling a firewall from the only terminal that can reach your new server. The window stays open, yet your next login times out. When comparing secure VPS Netherlands plans, find out how you would reach the console if SSH stopped working. Then use the following sequence on a fresh Ubuntu Server instance before you deploy an application.  

Prepare recovery access for your VPS Netherlands instance

First, record the server address, SSH port, initial username and operating system version. Open the provider’s console from the control panel. If it asks for a local password, confirm you have an account that can actually use it.

Next, compare the server’s SSH host key fingerprint with the value from a trusted channel. From a trusted Linux console, the command below prints the server’s Ed25519 fingerprint. Compare it with the fingerprint your workstation shows on first connection. If the values differ, check the address and provisioning details with the host.

ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub

Give each administrator a tested SSH key

Use the image’s named administrator if your provider already created one. Otherwise, create a named account from your initial administrative session. On Ubuntu, the following example creates an operator called opsadmin and grants access to sudo. Choose your own account name and set its local password for sudo prompts.

On your workstation, generate a separate key for this server and protect it with a passphrase. Choose a fresh filename so you preserve existing keys. The example assumes SSH uses port 22. Replace SERVER_IP with your server address.

If the image already requires keys, use the provider console or an existing administrator to install the public key. Keep the private key on your workstation. Then open a second terminal and force a key-only test.

Inside that new session, run sudo -v followed by sudo whoami. The second command should print root. Give application services their own accounts and grant administrative rights only to people who maintain the system.

Restrict SSH login on your VPS Netherlands Server

Once the named account passes both tests, review the effective SSH settings. Ubuntu images can load configuration snippets before settings in the main file. Because OpenSSH generally uses the first value it finds for each option, a later snippet may have no effect.

For a key-only setup without keyboard-interactive authentication, use the following settings in the applicable server configuration. If your organisation uses keyboard-interactive MFA, retain its documented configuration and test that login flow separately.

First, run sudo sshd -t to validate the syntax. Then inspect sudo sshd -T for the effective values. If your configuration uses Match rules, supply the intended connection details with sshd -T -C.

On Ubuntu, run sudo systemctl reload ssh only after validation succeeds. Then repeat the named account login from a fresh terminal. Keep the original connection until the new one works.

Recovery note

If a fresh login fails, use the original session to restore the last working settings. Validate the configuration again before reloading SSH.

Allow SSH before enabling the firewall

Check which firewall manager your image already uses. On Ubuntu with UFW, the example below assumes SSH listens on TCP port 22. If you use a different port, substitute that port before enabling UFW. Also check the provider firewall, which can filter traffic before it reaches the server.

If administrators have a stable VPN address, scope the management rule to that source when creating it. Test from the VPN before removing a wider rule. For an IPv6-enabled server, verify access and filtering over IPv6 as well.

Update the OS and retest after reboot

On Ubuntu, refresh the package index and review the available upgrades. Then install them while you still have console access. Read any configuration prompts carefully, especially if you recently changed the SSH settings.

If the server requests a reboot, schedule it before bringing the application online. Afterwards, reconnect with the named account, test sudo and inspect the active firewall rules. Record the permitted management port and the date of the upgrade for the next administrator.

Frequently asked questions

Que: Can I close the original SSH session after installing my public key?

Ans: Keep it open until another terminal authenticates with the intended key and sudo succeeds. Then repeat that test after the firewall change.

Que: Do I need UFW and firewalld together?

Ans: Choose the manager your distribution already uses. For example, use the active firewalld zone on an image that ships with firewalld.

Que: Should I open web ports during the first hour?

Ans: Open them when you have a web service ready for visitors. Until then, permit only the management traffic you need.