VPS

How to connect to your VPS with SSH (and RDP for Windows VPS)

Use the IP address, username and password from your VPS welcome email with the ssh command or PuTTY. Then switch to key based login, update the system and turn on a firewall before you install anything else.

Updated 3 min readApplies to: VPS

When to use this

SSH (Secure Shell) gives you an encrypted command line on your Linux server. You need it for almost everything on a Linux VPS: installing software, editing configuration and reading logs. If you are still deciding whether you need a VPS, see what a VPS is.

Before you start: Your welcome email holds the VPS IP address and login details. Use exactly what it says, including any non standard SSH port. The examples below use 203.0.113.10, an address reserved for documentation.

Connect from Windows

Built in OpenSSH (Windows 10 and 11)

  1. Open PowerShell or Windows Terminal.

  2. Type the command with the username and IP from your email:

    ssh username@203.0.113.10
    # if your email gives a different port, for example 2222:
    ssh -p 2222 username@203.0.113.10
    
  3. Compare the host key fingerprint shown on first connection with the one in your email or VPS panel if provided, then type yes.

  4. Enter the password. Nothing appears while you type; that is normal.

If ssh is not recognised, add the OpenSSH Client under Settings > System > Optional features.

PuTTY

  1. Open PuTTY, type the IP in Host Name, set the Port (22 unless told otherwise), and choose SSH.
  2. Click Open, accept the host key, and log in with your username and password.

Connect from macOS or Linux

  1. Open Terminal.
  2. Run ssh username@203.0.113.10 and follow the same prompts as above.

Set up key based login

Keys are much harder to steal or guess than passwords.

  1. Create a key pair on your computer (Windows PowerShell, macOS or Linux):

    ssh-keygen -t ed25519 -C "you@yourbusiness.in"
    

    Press Enter to accept the default location, and set a passphrase.

  2. Copy the public key to the server. On macOS or Linux:

    ssh-copy-id username@203.0.113.10
    

    On Windows PowerShell:

    type $env:USERPROFILE\.ssh\id_ed25519.pub | ssh username@203.0.113.10 "mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys"
    
  3. Log out and connect again. It should ask for the key passphrase, not the server password.

First security steps

  1. Update the system:

    # Ubuntu or Debian
    sudo apt update && sudo apt upgrade -y
    # AlmaLinux, Rocky Linux or similar
    sudo dnf upgrade -y
    
  2. Create a regular user with sudo rights for daily work if your login is the administrator account, and test logging in as that user with your key.

  3. Enable a firewall, allowing SSH before you switch it on. If your VPS has a control panel that uses its own ports, allow those too.

    # Ubuntu or Debian (ufw)
    sudo ufw allow OpenSSH
    sudo ufw allow 80,443/tcp
    sudo ufw enable
    
  4. Disable password login, carefully. Keep your current session open, then edit /etc/ssh/sshd_config (and check files in /etc/ssh/sshd_config.d/, which can override it) to set:

    PasswordAuthentication no
    PermitRootLogin prohibit-password
    

    Run sudo sshd -t to check for errors, then sudo systemctl reload ssh (Ubuntu or Debian) or sudo systemctl reload sshd (AlmaLinux or Rocky). Open a second terminal and confirm you can still log in with your key before closing the first one.

Windows server: use Remote Desktop

A Windows server is managed with Remote Desktop (RDP) rather than SSH. If you need a Windows server and do not have one yet, contact ODHOST with your requirements.

  1. Open Remote Desktop Connection on Windows (search for mstsc). On a Mac, install Microsoft's Windows App from the App Store.
  2. Enter the IP address from your welcome email and click Connect.
  3. Sign in with the username and password from the email.
  4. Change the password after first login, keep Windows Update on, and restrict RDP in Windows Defender Firewall to your office IP addresses if you can.

How to confirm it worked

  • You can log in with your key, and a password login attempt is refused.
  • sudo ufw status (or sudo firewall-cmd --list-all) shows SSH, HTTP and HTTPS allowed.
  • Updates report nothing left to install.

If it still fails

Open a support ticket with the VPS IP, the exact command you ran, the full error text (run ssh -v for detail), your public IP address, and what you changed last (firewall, SSH port, keys). Never send private keys or passwords. For more server options, see hosting for developers.

Frequently asked questions

Where do I find my VPS login details?

In the welcome email sent when the VPS was set up. It lists the IP address and login details. If you cannot find it, open a ticket from the client area.

What if SSH says "Connection refused" or times out?

Check the IP and port, and whether the VPS is running. If you recently enabled a firewall or changed the SSH port, the rule may be blocking you; use the provider's console, if offered, or ask support.

Is it safe to turn off password login?

Yes, once you have confirmed key login works in a second session. Turning it off stops password guessing attacks entirely, but if you lose your key you will need console access to recover.

Which operating system is on my VPS?

It is whatever you chose or was set up at order time; check the welcome email or run cat /etc/os-release after logging in. Commands differ slightly between Ubuntu or Debian and AlmaLinux or Rocky Linux.

Sources and further reading

Contact us