SSH is the secure way to access your VPS command line remotely. This guide covers connecting from macOS, Linux, and Windows.
Connecting from macOS or Linux
Open Terminal and run:
ssh root@YOUR_VPS_IPIf using a custom port: ssh -p 2222 root@YOUR_VPS_IP. Enter your password when prompted.
Connecting from Windows
Option A: Windows 10/11 includes OpenSSH. Open PowerShell and use the same ssh root@YOUR_VPS_IP command.
Option B: Download PuTTY (free). Enter your IP in the Host Name field, ensure port is 22 and SSH is selected, click Open.
Using SSH Key Authentication
For passwordless and more secure login, generate a key pair and copy the public key to the server:
ssh-keygen -t ed25519\nssh-copy-id root@YOUR_VPS_IPNow you can connect without a password prompt.
Preventing Timeout
Long idle sessions may disconnect. Add to ~/.ssh/config on your local machine:
Host *\n ServerAliveInterval 60\n ServerAliveCountMax 3