Skip to main content
JKPRO JournalIT support / 3 min read

Ubuntu 24.04 server setup: SSH access and handover

Prepare SSH access on Ubuntu 24.04 with a named administrator, key authentication checks, and a clear server handover.

A fresh server needs a reliable way in before it needs an application. This walkthrough prepares SSH access on Ubuntu Server 24.04 LTS with a named administrator account. It assumes you already have a VPS, its IP address, and access to your provider's recovery console.

Use the example account name deploy consistently, or replace it throughout. These instructions are a starting point for a single server, not a complete security policy.

Check your starting point

Connect using the initial account supplied by your hosting provider. Some images use ubuntu; others initially use root. On the server, check the operating system and install available updates:

bash
cat /etc/os-release
sudo apt update
sudo apt upgrade

Read the package summary before accepting. If a restart is required, schedule it before hosting customer traffic. Record who owns the provider account and how you would recover access if SSH stopped working.

Create a named administrator

From an account that already has administrative privileges:

bash
sudo adduser deploy
sudo usermod -aG sudo deploy

Choose a strong account password when prompted. This password may still be required by sudo even when SSH uses a key. Avoid sharing one administrator login across an entire team; separate accounts make ownership and access removal clearer.

Install your public key

On your own computer, create a dedicated key if you do not already have one. Choose an unused filename when prompted, and use a passphrase. Never overwrite an existing key without checking what uses it.

bash
ssh-keygen -t ed25519
ssh-copy-id -i ~/.ssh/id_ed25519.pub deploy@YOUR_SERVER_IP
ssh deploy@YOUR_SERVER_IP

Replace YOUR_SERVER_IP. If the provider disables password login, ssh-copy-id cannot bootstrap access this way: use the provider console or your existing administrator session to install the public key in the new account's ~/.ssh/authorized_keys. Keep the private key on your own computer.

In a second terminal, confirm the new login works and run sudo -v. Keep the original session open while making access changes.

Review SSH configuration before tightening it

Ubuntu supports configuration snippets under /etc/ssh/sshd_config.d/. Existing image or cloud-init settings can affect which value wins. Inspect the effective configuration rather than assuming a newly added file overrides everything:

bash
sudo sshd -T | less
sudo sshd -t

After you have verified key access and recovery access, consider disabling password and direct root authentication in your server's effective configuration. Validate again before restarting SSH. Ubuntu's OpenSSH documentation explains configuration files and validation. This guide intentionally does not blindly overwrite your provider's SSH settings.

Write down the handover

Before deploying an app, record the server owner, recovery procedure, patching responsibility, backup location, and approved inbound ports. A server that only one person can recover is a business dependency worth fixing early.

Next, follow our Docker Compose deployment guide. If your team needs ongoing maintenance, explore managed IT support.