How to Connect to a Linux VPS
How to Connect to a Linux VPS Once your Linux VPS is provisioned and you have received your setup instructions by email, the next…
How to Connect to a Linux VPS
Once your Linux VPS is provisioned and you have received your setup instructions by email, the next step is to connect to it. The standard way to connect to a Linux VPS is through SSH (Secure Shell). This guide walks you through the process step by step.
What You Need
Before you start, make sure you have the following information from your VPS setup email:
- Server IP address — the public IP of your VPS.
- Username — typically
rootorubuntuoradmin. - Password — or a secure credential delivery method.
- Operating system — the Linux distribution installed (Ubuntu, Debian, etc.).
Connecting from Windows
Windows 10 and 11 include a built-in SSH client. Open the Command Prompt or PowerShell and type:
ssh username@server-ip
For example:
ssh [email protected]
You will be prompted to accept the server’s fingerprint (type yes and press Enter), then enter your password. If you are using a non-standard SSH port, add the -p flag:
ssh -p 2222 [email protected]
If you prefer a graphical SSH client, PuTTY is a popular free option for Windows. Enter the IP address, port, and use the SSH protocol.
Connecting from macOS or Linux
macOS and Linux both include SSH clients by default. Open the Terminal and type:
ssh username@server-ip
The process is the same as on Windows — accept the fingerprint, enter the password, and you are in.
Using SSH Keys (Recommended)
Password authentication works, but SSH key authentication is more secure and convenient. Here is how to set it up:
- Generate a key pair on your local machine:
ssh-keygen -t ed25519 -C "[email protected]" - Copy the public key to your VPS:
ssh-copy-id username@server-ip - Test the connection — you should now be able to log in without a password:
ssh username@server-ip
Once SSH keys are set up, you can disable password authentication in the SSH configuration on your VPS for added security.
Basic Commands After Connecting
Once you are logged in, here are some useful commands to get started:
whoami— check which user you are logged in as.uname -a— check the kernel and OS version.df -h— check disk usage.free -m— check memory usage.toporhtop— monitor CPU and memory in real time.cd /var/www— navigate to the web root (if set up).sudo apt update && sudo apt upgrade— update packages (Debian/Ubuntu).
Troubleshooting Connection Issues
- Connection timed out: Check that the IP address is correct and that your VPS is running. Verify that port 22 (or your custom port) is open in the firewall.
- Permission denied: Double-check the username and password. If you are using a non-root user, make sure it has SSH access.
- Host key verification failed: This happens if the server’s key has changed. Remove the old key from
~/.ssh/known_hostsand reconnect.
Next Steps
Once you are connected, you can start setting up your environment. Install a web server (Nginx, Apache), a database (MySQL, PostgreSQL), and your application. If you need help with setup, contact us and we will be happy to assist.
Explore VPS Plans
Apply what you learned with a plan that fits your project.