Connecting to your VPS (Virtual Private Server) via SSH is a crucial skill for developers, system admins, and business owners who manage their own hosting environment. Whether you're hosting a website or deploying a custom application, SSH (Secure Shell) offers a secure way to control your server remotely.
In this guide, we’ll walk you through everything you need—from understanding SSH to logging in using a terminal or SSH client like PuTTY. Visuals included!
What is SSH?
SSH (Secure Shell) is a cryptographic network protocol that allows secure remote access to your VPS. You can manage files, run commands, install software, and perform system maintenance—all securely over the internet.
What You’ll Need
Before connecting, make sure you have:
✅ Server IP Address
✅ Username (usually root
)
✅ Password or SSH Key
✅ SSH Client (e.g., Terminal, PuTTY, or MobaXterm)
Method 1: Connecting to VPS via Terminal (MacOS/Linux/Windows PowerShell)
Step 1: Open your terminal
-
Mac/Linux: Open "Terminal"
-
Windows: Open “PowerShell” or “Command Prompt”
Step 2: Enter the SSH command
Step 3: Enter your password when prompted
-
Type the password (you won't see it due to security) and press
Enter
.
✅ Once logged in, you'll see something like this:
Method 2: Using PuTTY on Windows
Step 1: Download and install PuTTY
Step 2: Open PuTTY and enter your server details
-
Host Name:
your-server-ip
-
Port:
22
-
Connection Type:
SSH
Step 3: Click “Open”
You’ll see a black terminal screen asking for login credentials.
Step 4: Login with your username and password
Optional: Connect Using SSH Key (More Secure)
If your provider requires SSH key login:
Step 1: Generate an SSH key (if you don’t have one)
Step 2: Add your public key to the server (ask your provider if unsure how)
Step 3: Connect using:
Common SSH Commands
Command | Description |
---|---|
ls |
List files |
cd foldername |
Change directory |
nano filename |
Edit file |
apt update |
Update package list (Ubuntu/Debian) |
reboot |
Restart the server |