Connecting to your server is the first real step after buying a VPS. This guide shows how to connect to a VPS using SSH and transfer files using SFTP safely. Once connected, you’ll be ready to start configuring your server.
Table of Contents
What Is SSH and Why Do You Need It?
When you buy a VPS, you don’t get a graphical interface like shared hosting. Instead, you access your server through SSH (Secure Shell), which lets you run commands remotely.
SSH is secure, fast, and the standard way to manage Linux servers. Without it, you cannot install software, configure services, or manage your VPS.
This is part of our VPS Setup series. See more in VPS Basics & Preparation.
What You Need Before Connecting
Before connecting, make sure you have:
- Your server IP address
- A username (usually root, ubuntu, or ec2-user)
- A password or SSH key
- An SSH client installed
If you haven’t chosen a server yet, see Best Unmanaged VPS Providers (2026 Edition) to pick the right platform.
Connect to VPS Using SSH (Linux or macOS)
If you are using Linux or macOS, you can connect directly from the terminal.
Run:
ssh root@your_server_ip
Example:
ssh root@192.168.1.10
If it’s your first time connecting, you’ll see a fingerprint prompt. Type; Yes, then enter your password.
If your provider uses a different user like ubuntu, replace root accordingly.
Connect to VPS Using SSH (Windows)
On Windows, you can use tools like:
- PuTTY
- Windows Terminal (built-in SSH)
- Termius
Using PowerShell or Windows Terminal:
ssh root@your_server_ip
For PuTTY:
- Enter IP address
- Enter Port (Usually 22)
- Select SSH
- Click Open
- Enter username and password

Connect Using SSH Key (Recommended)
Many providers use SSH keys instead of passwords. I went in to details about login into Google Cloud VM instance with SSH key file and Using a SSH key pair to login to AWS EC2 instance a few years back. They are still valid and you can refer to them for more in-dept guide about the topic.
If you have a key file:
ssh -i your-key.pem ubuntu@your_server_ip
Make sure your key has correct permissions:
chmod 400 your-key.pem
SSH keys are more secure than passwords and should be used whenever possible.
How to Transfer Files Using SFTP
SFTP allows you to upload and download files from your VPS.
You can use:
- FileZilla
- WinSCP
- Cyberduck
Connection settings:
- Host: your server IP
- Protocol: SFTP
- Username: root or sudo user
- Password or SSH key
This is useful when uploading website files or backups.
Common Connection Issues
If you cannot connect, check:
- Wrong IP address
- Firewall blocking port 22
- Incorrect username
- Wrong SSH key permissions
You can also verify your server is running and accessible from your provider dashboard.
If you’re unsure about server specs or setup, review How Much RAM Does a VPS Need to ensure your VPS is properly sized.
What to Do After Connecting
Once you’re connected, the next step is securing your server.
Follow the guide: How to Update & Secure Ubuntu 24.04 to protect your VPS before installing any applications.
Conclusion
Connecting to your VPS using SSH is the foundation of server management. Once you’re connected, you can install software, configure services, and manage your system securely. Understanding SSH and SFTP ensures you can control your server with confidence.
If you’re new to VPS hosting, continue with the full setup path here: VPS Setup Beginner’s Guide



