Knowledgebase

First Steps After Your VPS or Dedicated Server Is Delivered

After your Cloudesta VPS or dedicated server is delivered, log in over SSH as root using the IP address, password and SSH port from your welcome email. Then change the root password, create a personal sudo user, install all package updates, and set the hostname and timezone. If the server will send email, open a support ticket to set reverse DNS (rDNS). Finally, add SSH keys, a firewall and backups. This guide walks through each step on Ubuntu 24.04, and the same commands work on Ubuntu 22.04.

Prerequisites

  • A delivered Cloud VPS or dedicated server running Ubuntu 22.04 or 24.04.
  • The welcome email for that server.
  • An SSH client. Windows 10/11, macOS and Linux all include one.
  • Optional: a domain name you control, so you can use a proper hostname such as server1.example.com.

1. What does the server welcome email contain?

The welcome email has everything you need for the first login:

  • Server IP address: your dedicated IPv4 address, for example 203.0.113.10.
  • Username: root.
  • Root password: a generated password. You will replace it in step 3.
  • SSH port: usually 22. Use whatever port the email states.
Treat the welcome email as sensitive. Anyone who reads it can log in to your server until you change the root password.

2. How do I connect to my server over SSH for the first time?

From Windows 10/11

Open PowerShell or Windows Terminal and run the command below. Replace the IP and port with the values from your email.

ssh -p 22 root@203.0.113.10

If you prefer a graphical client, PuTTY also works. Enter the IP in Host Name, set the Port, choose SSH and click Open.

From macOS or Linux

Open Terminal and run the same command:

ssh -p 22 root@203.0.113.10

On the first connection you will be asked to confirm the server's host key fingerprint. Type yes and press Enter, then paste the root password. The password is not shown as you type, and that is normal.

3. How do I change the root password?

Do this immediately, before anything else:

passwd

Enter a long, unique password twice and store it in a password manager. A passphrase of 16 or more characters is a good choice.

4. How do I create a sudo user on Ubuntu?

Day-to-day work should run under a normal account that can raise its privileges with sudo. Replace deploy with your preferred username:

adduser deploy
usermod -aG sudo deploy

adduser asks for a password and some optional details. You can press Enter to skip the details.

Keep your root session open. In a second terminal, test the new account:

ssh -p 22 deploy@203.0.113.10
sudo whoami

The second command should print root.

5. How do I update all packages?

Install all available security and bug-fix updates:

sudo apt update && sudo apt full-upgrade -y
sudo apt autoremove -y

If a kernel or core library was updated, Ubuntu creates /var/run/reboot-required. Check for that file and reboot if it exists:

[ -f /var/run/reboot-required ] && sudo reboot

6. How do I set the hostname and timezone?

Use a fully qualified hostname under a domain you own. Ideally, create a DNS A record for it that points to your server IP.

sudo hostnamectl set-hostname server1.example.com

Next, edit /etc/hosts with sudo nano /etc/hosts so the name resolves locally. Add or update this line:

127.0.1.1 server1.example.com server1

Set the timezone so logs and cron jobs use your local time. The example below uses Egypt; to see every valid name, run timedatectl list-timezones.

sudo timedatectl set-timezone Africa/Cairo
timedatectl

7. How do I set reverse DNS (rDNS/PTR) for my server IP?

Reverse DNS maps your IP back to a hostname, for example 203.0.113.10 to server1.example.com. The IP address belongs to Cloudesta's network, so only Cloudesta can set the PTR record.

To request it, open a support ticket from the client area. Include the server IP and the hostname you want.

Why rDNS matters for email: Gmail, Outlook and most other mail providers check that the sending IP has a PTR record. They also check that the PTR hostname resolves back to the same IP through an A record. If either check fails, your mail is often rejected or sent to spam.

Before you open the ticket, create the A record for the hostname. Once the PTR is set, verify it:

dig -x 203.0.113.10 +short
dig server1.example.com +short

If you only need mailboxes and don't want to run a mail server yourself, consider business email instead.

8. What are rescue mode and OS reinstall?

  • Rescue mode boots the server into a temporary recovery system. From there you can mount your disks, fix a broken boot or firewall configuration, reset a lost password or copy data off. Your installed system is not changed unless you change it.
  • OS reinstall wipes the disk and installs a fresh operating system. All data on the server is erased.

Both are requested by opening a support ticket. The same applies to IP changes and plan upgrades. Back up anything important before you ask for a reinstall.

9. What should I do next to secure the server?

  • SSH keys: generate a key pair with ssh-keygen -t ed25519 on your computer and copy it to the server with ssh-copy-id -p 22 deploy@203.0.113.10. After key login works, disable password logins in the SSH server configuration.
  • Firewall: allow SSH before you enable UFW, or you will lock yourself out. If your SSH port is not 22, use sudo ufw allow 2222/tcp with your actual port number instead of OpenSSH.
  • Backups: schedule regular off-server backups of your data and configuration, and test that you can restore from them.
sudo ufw allow OpenSSH
sudo ufw enable
sudo ufw status

Detailed guides for each of these topics are in the Cloudesta knowledgebase.

Verify it works

Log in as your sudo user and run these checks:

hostname -f              # server1.example.com
timedatectl | grep zone  # Africa/Cairo
groups                   # includes sudo
apt list --upgradable    # little or nothing listed
sudo ufw status          # active, SSH allowed (if enabled)

Common problems

  • "Connection timed out" or "Connection refused": make sure you are using the IP and port from the welcome email. If you enabled UFW without allowing SSH, open a ticket and ask for rescue mode, then fix the rules from there.
  • "Permission denied" for root: passwords are case-sensitive. Copy the password without trailing spaces, or type it manually.
  • "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED" after a reinstall: this is expected because the new OS has new host keys. Remove the old key on your computer with ssh-keygen -R 203.0.113.10. If you use a non-default port, run ssh-keygen -R "[203.0.113.10]:2222" instead.
  • "Could not get lock /var/lib/dpkg/lock-frontend": automatic updates are running in the background. Wait a few minutes and retry. Do not delete the lock files.
  • Hostname resets after reboot: if your image uses cloud-init, set preserve_hostname: true in /etc/cloud/cloud.cfg, then set the hostname again.

Frequently asked questions

Can I set reverse DNS myself?

No. The PTR record lives in Cloudesta's DNS for the IP range, so you need to open a support ticket with the IP and the hostname you want.

Should I keep using the root account?

Use a sudo user for daily work and keep root for emergencies. Once SSH keys are working, disable password-based root login.

Will an OS reinstall keep my files?

No. A reinstall erases the disk completely. If you only need to repair the system or recover data, request rescue mode instead.

Need help? Open a support ticket from your client area and include your server IP and a description of what you tried.

Was this answer helpful?

0 Users Found This Useful

Powered by WHMCompleteSolution