How to Connect to a Linux VPS (SSH & SFTP Guide)

Learn how to connect to a VPS using SSH and SFTP on Ubuntu. Step-by-step guide for beginners with secure access methods.

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:

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:

Using PowerShell or Windows Terminal:

				
					ssh root@your_server_ip
				
			

For PuTTY:

Putty login screen

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:

Connection settings:

This is useful when uploading website files or backups.

Common Connection Issues

If you cannot connect, check:

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

Tharindu

Hey!! I'm Tharindu. I'm from Sri Lanka. I'm a part time freelancer and this is my blog where I write about everything I think might be useful to readers. If you read a tutorial here and want to hire me, contact me here.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button