SSH (Secure Shell) is the standard way to remotely access and manage a Linux VPS. This guide covers connecting from Windows, macOS, and Linux, using both passwords and SSH keys, plus troubleshooting for the most common connection problems.
What You Need Before Connecting
- Your VPS IP address
- Your SSH username (often
rootinitially) - Your SSH password, or a private key file
- The SSH port (default is
22unless changed)
Connecting from Windows
Modern Windows includes an OpenSSH client built into PowerShell and Windows Terminal — no extra software required.
ssh root@YOUR_SERVER_IP
If your VPS uses a custom SSH port:
ssh -p 2222 root@YOUR_SERVER_IP
On first connection, you'll be asked to confirm the server's fingerprint — type yes if the IP matches your VPS.
Connecting from macOS or Linux
Open Terminal and use the same command:
ssh root@YOUR_SERVER_IP
Connecting with an SSH Key (Recommended)
If you've configured key-based authentication:
ssh -i /path/to/private_key root@YOUR_SERVER_IP
Never share your private key file with anyone.
Verifying You're Connected
whoami
hostname
uname -a
Copying Files with SCP
scp file.txt root@YOUR_SERVER_IP:/home/username/
Common Connection Problems
Connection timed out — the VPS may be unreachable, or the SSH port is blocked by a firewall. Verify the IP and port shown in your VPS For Life Client Area.
Connection refused — the SSH service may not be running, or you're using the wrong port:
sudo systemctl status ssh
Permission denied (publickey,password) — check your username, password, or key path. If password login is disabled, you must use the correct SSH key.
Wrong SSH port — specify it explicitly with -p:
ssh -p PORT username@SERVER_IP
Recommended Next Steps After First Login
- Create a dedicated sudo user instead of using root for daily work
- Set up SSH key authentication
- Change the default SSH port and disable root login
- Enable a firewall
FAQ
Do I need special software on Windows?
No — Windows 10/11 include OpenSSH by default in PowerShell and Windows Terminal. Third-party tools like PuTTY are optional alternatives.
Is it safe to type "yes" to accept the server fingerprint?
Yes, on first connection to a server you know is yours. If the warning reappears on a server you've connected to before, verify with VPS For Life support before proceeding, as it can indicate a changed host key.
New to VPS For Life? If you haven't ordered your VPS yet, browse our VPS hosting plans to get started, or contact our support team if you need help choosing the right one.
Continue Reading
- How to Create a New User with Sudo Access on a Linux VPS
- SSH Hardening: Change the Port, Disable Root Login & Use SSH Keys
- How to Transfer Files To and From a VPS (SCP, SFTP & rsync)
Browse more articles in Getting Started / VPS Basics.
