What this solves
A new VPS is reachable on the public internet. These steps harden SSH and the host firewall without locking you out of iHoster24 management tools.
Firewall
Allow SSH (and HTTP/HTTPS if you host websites) before enabling the firewall.
Ubuntu/Debian (UFW):
ufw allow OpenSSH
ufw allow 80/tcp
ufw allow 443/tcp
ufw enableAlmaLinux/Rocky (firewalld):
firewall-cmd --permanent --add-service=ssh
firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
firewall-cmd --reloadAdvanced users can use iptables / nftables directly — same idea: never block port 22 until an alternate access path works.
SSH keys
On your PC: ssh-keygen -t ed25519. Copy the public key: ssh-copy-id root@YOUR_VPS_IP. Confirm key login works, then set PasswordAuthentication no in /etc/ssh/sshd_config and restart sshd.
Optional: disable root password login
Create a sudo user with your key, test login, then set PermitRootLogin prohibit-password (or no if you only use the sudo user).
When to contact support
If you’re locked out of SSH and console, open a ticket — we can help with rescue steps.
Was this helpful?
Thanks for your feedback!