Skip to content

AS213941 · Peering-20% on all VPS with code NVH20 · Delivered in 60 seconds

Linux VPSFrom €2.49/monthWindows VPSFrom €3.49/monthFiveM serverFrom €0.99/monthMinecraft serverFrom €1.99/month
VPS & Cloud

Ranges

Linux NVMe VPSRoot access, Debian, Ubuntu, Alma…Windows RDP VPSRemote desktop, licence includedDedicated serversIntel Xeon Gold, exclusive resourcesPterodactyl VPSGame panel preinstalled

Network and hosting

Anti-DDoSWeb hostingColocationIP transitVPN

Professionals

Reseller VPSReseller programme
Solutions

Bots and automation

AI agents VPSA server for your coding assistants and autonomous agentsOllama VPSYour private AI without a GPU, data in FranceTelegram bot VPSPython or Node.js, always reachableDiscord bot VPSMusic, moderation, tickets: no downtimeVinted bot VPSMonitor and Discord alerts 24/7n8n VPSWorkflows with no execution limitVPN VPSAn encrypted tunnel exiting in FranceWeb scraping VPSScheduled data collection, dedicated IP

Trading

Forex VPSYour robots manage positions overnightMetaTrader 4 VPSSeveral MT4 terminals on one machineMetaTrader 5 VPSForex, indices and stocks in MT5NinjaTrader VPSFutures and NinjaScript strategiesProp firm VPSChallenges and funded accounts, terminal always onlineAfrica trading VPSMetaTrader in Paris, from North or West AfricaRDP VPSWindows remote desktop, always onTrading bot VPSOpen-source crypto bots, protected API keys

Broker and prop firm VPS

FTMO VPSDedicated French IP, outside the USFundedNext VPSPrivate VPS for your EAsThe5ers VPSFixed IP, consistent locationIC Markets VPSWithout the 15 lots a month quotaPepperstone VPSMT4, MT5 and cTrader, fixed priceXM VPSNo $5,000 minimum balanceExness VPSSmall accounts welcome, 7 ms to London

Windows desktop

Windows 10 VPSFor software that requires Windows 10Windows 11 VPSA modern Windows desktop, reachable anywhereSEO VPSLarge-site crawls without tying up your PCStreaming VPSAn OBS studio streaming from the data centreWordPress VPSFast websites on NVMe disks
Marketplace

AI

OllamaLocal language models, with no external APIOpen WebUIA chat interface for your Ollama modelsAnythingLLMA private AI assistant for your documentsLangflowVisual editor for agents, RAG flows and AI APIsFlowiseBuild AI agents and chatbots visuallyQdrantVector database for RAG and semantic search

Trading

MetaTrader 5Official MT5 terminal, ready for your EAsMetaTrader 4Official MT4 terminal, ready for your EAsForex VPS pack (MT4 + MT5)MT4 and MT5 together, on a VPS tuned for tradingNinjaTrader 8NinjaTrader 8 with its prerequisitesFreqtradeOpen-source crypto trading bot, in simulation modeInteractive Brokers TWS / IB GatewayTWS or IB Gateway, official stable version

Bots and agents

Claude CodeAnthropic's coding agent, in your terminalCodex CLIOpenAI's command-line coding agentTelegram botYour Telegram bot, with automatic restartDiscord botYour Discord bot, with automatic restartOpenClawOpen-source personal AI assistant, active 24/7Hermes AgentAutonomous open-source AI agent

Deployment and automation

DockerThe container engine and Docker Composen8nYour automations, with no execution limitPortainerManage your Docker containers from your browserCoolifyDeploy your applications from Git, on your own serverUptime KumaMonitor your sites and servers, with alerts

Websites and databases

WordPressThe most widely used CMS, on a fast Nginx stackApache + PHP + MySQLApache, PHP and MariaDB, ready for your sitesMySQL (MariaDB)MySQL-compatible database serverPleskPlesk hosting panel, with your own licenceNextcloudYour own cloud for files, calendar and contacts

Network and security

WireGuardYour encrypted VPN, preinstalled free of chargeVaultwardenA self-hosted password manager

Game servers

FiveMFiveM server with txAdmin and MariaDB, ready to useMinecraftTurnkey Minecraft Java server, plugins and mods includedRustRust server with automatic updates and Oxide or CarbonCounter-Strike 2Dedicated Counter-Strike 2 server, installed for youPalworldDedicated Palworld server, installed for youValheimDedicated Valheim server, installed for you
Gaming

Game servers

FiveM servertxAdmin, ESX, QBCoreMinecraft serverJava, Bedrock, modpacksRust serverOxide, Carbon, wipesNova-Life serverNova-Life: Amboise RP

Protection and tools

FiveM Anti-DDoSFree tools
Resources

Learn

DocumentationBlog

Assistance

ContactSLA commitment
View plans Client area Peering · AS213941

Security

Securing SSH on a VPS: keys, root disabled and Fail2ban

By NVHCloud Team 3 October 2026 6 min read

As soon as a server gets a public IP address, bots try to log in over SSH with lists of common passwords. This is not theoretical: run journalctl -u ssh | grep -c Failed on a VPS that has been online for a few days, and the count is often in the thousands. This guide makes those attempts useless.

1. Why it is the first thing to do

A password can be guessed, reused or leaked. An ED25519 SSH key, in practice, cannot be guessed. Three measures together remove most of the risk:

  • Key-only authentication: passwords are no longer accepted at all.
  • Root login forbidden: an attacker must also guess a username.
  • Fail2ban: addresses that keep trying are banned automatically.

2. Create and install an SSH key

On your computer:

ssh-keygen -t ed25519 -C "alex@laptop"

Choose a passphrase: if your computer is stolen, the key stays unusable. Then copy the public key to the user account on the server (created in the first steps):

ssh-copy-id alex@SERVER_IP

On Windows, where ssh-copy-id does not exist, the equivalent command is given in first steps on your VPS. Check that ssh alex@SERVER_IP works without asking for a password before going further.

3. Harden the configuration

Rather than editing the main /etc/ssh/sshd_config file, create a dedicated file in the configuration directory: it is not overwritten by updates and keeps your settings in one place.

cat > /etc/ssh/sshd_config.d/00-hardening.conf <<'EOF'
PermitRootLogin no
PasswordAuthentication no
KbdInteractiveAuthentication no
PubkeyAuthentication yes
MaxAuthTries 3
LoginGraceTime 30
X11Forwarding no
AllowUsers alex
EOF
AllowUsers only allows the listed accounts: separate them with spaces if you have several. MaxAuthTries drops the connection after three attempts.

4. The cloud-init trap

The file name starts with 00- for a reason. For each setting, OpenSSH keeps the first value it reads, and files in the directory are read in alphabetical order. Many Ubuntu images contain a 50-cloud-init.conf file with PasswordAuthentication yes. Named 99-..., your file would be read afterwards and silently ignored: passwords would still be accepted.

ls /etc/ssh/sshd_config.d/

To see which value really applies, ask the SSH server directly:

sshd -T | grep -E "permitrootlogin|passwordauthentication|kbdinteractive|allowusers"

5. Change the port (optional)

Moving away from port 22 does not stop an attacker targeting you, who will find the new port in seconds. It does, however, remove most automated attempts from your logs. If you do it, add the line Port 2222 to the file above, and open the port in the firewall first:

ufw allow 2222/tcp
⚠️ Ubuntu 22.10 and later start SSH through socket activation: the listening port is then defined by systemd, and simply restarting the service is not enough. After changing the port, run systemctl daemon-reload then systemctl restart ssh.socket. On Debian 12, systemctl restart ssh is enough.

6. Apply without locking yourself out

Check the syntax, then reload SSH. Do not close your current session.

sshd -t && systemctl reload ssh

Open a second terminal and test:

ssh alex@SERVER_IP                # must work
ssh root@SERVER_IP                # must be refused
ssh -o PubkeyAuthentication=no alex@SERVER_IP   # must be refused

If the first command fails, fix things from the session you kept open. If you changed the port, add -p 2222 to each command; once the new port works, remove the old firewall rule with ufw delete allow OpenSSH.

7. Install Fail2ban

Fail2ban reads the logs and bans, through the firewall, addresses that pile up failures. Even with passwords disabled, it reduces load and log noise.

apt install -y fail2ban
cat > /etc/fail2ban/jail.local <<'EOF'
[DEFAULT]
bantime  = 1h
findtime = 10m
maxretry = 5
banaction = ufw
[sshd]
enabled  = true
backend  = systemd
port     = ssh
maxretry = 3
bantime  = 24h
EOF
systemctl enable --now fail2ban
systemctl restart fail2ban

If you changed the port, replace port = ssh with port = 2222. backend = systemd is required on Debian 12, which no longer writes /var/log/auth.log by default; it sits in the [sshd] section rather than [DEFAULT] so it does not interfere with jails that read log files later, such as Nginx ones.

8. Verify

fail2ban-client status sshd
journalctl -u ssh --since "1 hour ago" | tail

The first command shows how many addresses are banned. Then add an allow-list firewall: configuring UFW.

Frequently asked questions

What if I locked myself out of my VPS?

Contact support to get console access without SSH. Delete or fix /etc/ssh/sshd_config.d/00-hardening.conf, then reload SSH. This is exactly why you should always test from a second terminal.

Why do SSH passwords still work after setting PasswordAuthentication no?

Almost always because another file is read before yours, such as 50-cloud-init.conf on Ubuntu: OpenSSH keeps the first value it finds. Prefix your file with 00- and check the applied value with sshd -T.

RSA or ED25519 keys?

ED25519: keys are shorter, faster and considered at least as secure as a 4096-bit RSA key. RSA is only useful for very old systems that do not support ED25519.

Is Fail2ban useful if passwords are disabled?

Yes, to a lesser extent: attempts can no longer succeed, but they use resources and fill the logs. Fail2ban cuts them short, and its real value shows when you extend it to other services, such as a website login page.

First steps on a Linux VPS

The 15-minute checklist for a new server.

Configuring the UFW firewall

An allow-list firewall and the ports to open for each use.

Linux NVMe VPS

Root access, Intel Xeon Gold and NVMe, delivered in 60 seconds. From €2.49/month.