To access a Linux VPS, you use SSH, a protocol that opens the server's terminal over the internet. All you need is the IP address, username, password, and port, plus a single command. In a few minutes you'll be inside the server.
If this is your first time, don't worry: there's nothing mysterious here. In this guide you'll find step-by-step instructions for Windows, Mac, and Linux, what to do on your first login, and the errors that commonly appear.
How to access a Linux VPS: what SSH is and what you need first
SSH (Secure Shell) is the standard way to manage a Linux server remotely. Everything you type travels encrypted, and what you see on screen is the server's terminal, as if you were sitting in front of it.
A Linux VPS usually has no graphical interface. You install programs, edit files, and restart services using commands. If you want to better understand this foundation, read the guide on what a VPS is and how it works before continuing.
To connect, you need four pieces of information:
- the server's IP;
- the username;
- the password;
- the connection port.
Connection details you need to have on hand
Once the server is activated, your access details are available in your client area and are usually also sent by email. Always check there and copy exactly what is written.
| Detail | What it is | Common value |
|---|---|---|
| IP | Your server's address on the internet | Provided after activation |
| Username | Account used to log in | root |
| Password | Account credential | Set during activation or sent to you |
| Port | SSH entry channel | 22 |
The root user is the full system administrator. It's used for first access, but further down you'll see why it shouldn't be your everyday account.
With a Linux VPS, you choose the distribution (Ubuntu, AlmaLinux, CentOS, or Debian) and can reinstall the system whenever you want. The SSH connection procedure is the same for all of them.
How to access a Linux VPS via SSH on Windows
On Windows you have two options: the terminal that comes with the system or PuTTY. In recent versions of Windows, the built-in terminal is usually enough. PuTTY can be useful when you want to save several servers and open each one with a few clicks.
Using the Windows terminal (PowerShell)
- Click the Start menu, type PowerShell, and open the program.
- Type the command below, replacing it with your server's actual IP:
ssh root@SEU_IP
- On first access, the terminal shows a warning that it doesn't recognize the server and asks whether you want to continue. Type
yesand press Enter. - Type the password and press Enter.
Note: when you type the password, nothing appears on screen, not even asterisks. This is intentional, for security. Type or paste it and press Enter.
If you see something like root@server-name:~#, you're in.
SSH on Windows with PuTTY
PuTTY is a free remote connection program. After installing it:
- Open PuTTY.
- In Host Name (or IP address), enter the server's IP.
- In Port, leave
22(or the port you configured). - For Connection type, keep SSH.
- To reuse the connection later, enter a name under Saved Sessions and click Save.
- Click Open.
- Accept the server key alert on first access.
- At login as, type
root, press Enter, and then enter the password.
From then on, to return to the server, just double-click the saved session.
Accessing a Linux VPS via SSH on Mac and Linux
On Mac and Linux, SSH is usually already installed. Open the Terminal (on Mac, search for it with Spotlight; on Linux, use your desktop's shortcut or search for Terminal in the menu) and run:
ssh root@SEU_IP
The steps are the same as on Windows: accept the key with yes and enter the password.
If the server uses a port other than 22, specify it with the -p option:
ssh -p 2222 root@SEU_IP
Replace 2222 with the port you configured. The same applies to PowerShell on Windows.
How to connect to an Ubuntu VPS for the first time
To connect to an Ubuntu VPS, the command is the same. What changes is what you do right after logging in. If you've purchased an Ubuntu VPS, follow this sequence:
- Confirm the fingerprint. The first-access warning shows the server's identification. Accepting it is normal the first time. If it appears again without you having reinstalled the system, be suspicious and verify it.
- Log in with the password you received.
- Update the packages:
apt update && apt upgrade -y
- Confirm everything works with
whoami(it should returnroot) andlsb_release -a(shows your Ubuntu version).
If the update asks you to restart, run reboot, wait a minute, and connect again.
Security precautions on your first login
A new server on the internet quickly receives automated login attempts. A few simple adjustments greatly reduce the risk:
- Change the initial password to a long, unique one using the
passwdcommand. - Create a regular user with administrator permissions (
adduser nameandusermod -aG sudo nameon Ubuntu and Debian) and use it day to day instead of root. - Use SSH keys. Generate a key pair on your computer with
ssh-keygenand send the public key to the server withssh-copy-id. Afterward, you can disable password login. - Consider changing the SSH port in the
/etc/ssh/sshd_configfile. This doesn't replace the other measures, but it reduces the noise from automated attempts. Before closing your session, test the new port in another window. - Keep the system updated regularly with
apt update && apt upgrade.
One important tip: never close your current session before testing the new configuration in a second window. That way, if something goes wrong, you can still fix it.
Common connection errors and how to fix them
| Message | Likely cause | What to do |
|---|---|---|
| Connection refused | SSH stopped or wrong port | Check the port and whether the service is running; use the emergency console in the panel |
| Connection timed out | Wrong IP, server powered off, or firewall blocking | Check the IP, confirm the server is on, and open the port in the firewall |
| Permission denied | Incorrect username or password | Check the username (root) and reset the password in the panel if needed |
| Password “not accepted” | Paste error or keyboard set to a different layout | Remember that the password doesn't appear on screen; type carefully or use copy and paste |
| Changed host key warning | Server reinstalled or IP reassigned | Remove the old entry with ssh-keygen -R YOUR_IP and connect again |
If you run public services, such as websites or game servers, also consider protection against attacks. Take a look at the AlmaLinux VPS, a robust alternative to CentOS, if you want a different distribution for a specific project.
Next step: set up your server and count on support
With access working, the path is open: installing a control panel, publishing a website, deploying an application, or setting up automation. Start with the security steps above and only then install the rest.
If you get stuck, HostMF's 24/7 support team, available in English and Portuguese, can help. Explore our Linux VPS plans and get your server online with no long-term contract.