How to Access Your VPS via SSH (Windows, Linux, macOS
Accessing your VPS (Virtual Private Server) via SSH is one of the first things you'll do when setting up a server. SSH (Secure Shell) provides encrypted, secure command-line access over the internet, giving you full control over your server.
This guide covers how to connect to your VPS from all major operating systems: Windows, Linux, and macOS.
Looking for a high-performance VPS with full root access and SSH ready out of the box? Check out EUGameHost’s UK-based VPS hosting — optimized for speed, uptime, and flexibility.
Prerequisites
Before you begin, you’ll need:
- Your VPS IP address
- SSH username (usually
rootor a user you’ve created) - The SSH port (default is 22 unless changed)
- Your password or SSH private key
Windows
Option 1: Using PowerShell (Built-in)
Windows 10 and later come with OpenSSH built-in.
- Open PowerShell
- Run the command:
ssh root@your-vps-ip- Accept the fingerprint if prompted.
- Enter your password when asked.
If your VPS uses a non-standard port:
ssh -p 2222 root@your-vps-ipOption 2: Using PuTTY (GUI Client)
- Download PuTTY from putty.org
- Enter your server’s IP under Host Name
- Set port to
22(or your custom port) - Click Open
- Login as
rootor your user
You can also load a private key via Connection > SSH > Auth.
Linux
- Open a terminal window
- Run:
ssh root@your-vps-ip- Enter your password or passphrase
To use a private key:
ssh -i /path/to/private-key.pem root@your-vps-ipTo specify a custom port:
ssh -p 2222 root@your-vps-ipmacOS
The steps are nearly identical to Linux:
- Open Terminal
- Use the
sshcommand as shown above.
Tip: You can save your SSH login with an alias in your ~/.ssh/config file:
Host myvps
HostName your-vps-ip
User root
Port 22
IdentityFile ~/.ssh/my-key.pemThen simply run:
ssh myvpsCommon Errors & Fixes
- Permission denied: Check username or permissions on your key file (
chmod 600it) - Connection timed out: Make sure port 22 (or your custom port) is open
- Host not found: Verify the IP or DNS name
Summary
SSH is a secure and flexible way to manage your VPS from anywhere. Whether you're using PowerShell, PuTTY, or a native terminal, the setup is quick and efficient.