UnderHost
Knowledgebase Docs

SSH setup for your dedicated server

Connect to your UnderHost dedicated server via SSH, complete first-login setup, create a non-root user, and secure SSH.

On this page

Your dedicated server comes with root SSH access. The IP address, root username, and initial password are in your provisioning email. The first thing to do after logging in is update packages, create a non-root user, and secure the SSH configuration.

First SSH login

ssh root@your-server-ip

On Windows, use Windows Terminal, PowerShell, or PuTTY. On Mac/Linux, use the built-in terminal. Accept the host key fingerprint on first connection. Once connected, update all packages immediately:

# AlmaLinux / CentOS
dnf update -y

# Ubuntu / Debian
apt update && apt upgrade -y

Create a non-root user

Running as root for all tasks is risky-a single mistake can be catastrophic. Create a regular user with sudo access:

# Ubuntu/Debian
adduser deploy
usermod -aG sudo deploy

# AlmaLinux/CentOS
adduser deploy
passwd deploy
usermod -aG wheel deploy

Test the new user before logging out of root: su - deploy

Set up SSH key authentication

SSH keys are more secure than passwords. Generate a key pair on your local computer (not the server):

ssh-keygen -t ed25519 -C "your-email@example.com"

Copy the public key to the server:

ssh-copy-id deploy@your-server-ip

Test that you can log in with the key: ssh deploy@your-server-ip-it should connect without asking for a password.

Basic SSH security

Edit /etc/ssh/sshd_config and set:

PermitRootLogin no          # Disable direct root login
PasswordAuthentication no   # Require SSH keys (only after you've set up your key!)
Port 22                     # Optionally change to a non-standard port
MaxAuthTries 3
Set up your SSH key before disabling password auth

Do not set PasswordAuthentication no until you have confirmed that SSH key login works from your machine. Locking yourself out of a dedicated server is a major problem-use the emergency console in CustomerPanel as a last resort.

Restart SSH after changes: systemctl restart sshd

Was this article helpful?

Need SSH access help?

Contact our NOC team if you have issues connecting via SSH or need credentials reset.

Related articles

Back to Dedicated Servers