Secure Shell (SSH) is the standard method for remotely managing your VPS. This guide covers connecting from Linux, macOS, and Windows using the built-in terminal or command-line tools.
Prerequisites
Before connecting, ensure you have:
- Your VPS IP address - found in your Domain India client area under VPS services
- Root password or SSH key - provided during VPS provisioning
- An SSH client - built into Linux/macOS; Windows 10+ includes OpenSSH
Connecting from Linux or macOS
Step 1: Open Your Terminal
On macOS, open Terminal from Applications > Utilities > Terminal. On Linux, use your preferred terminal emulator (e.g., GNOME Terminal, Konsole).
Step 2: Connect Using SSH
Run the following command, replacing the IP address with your VPS IP:
ssh root@YOUR_VPS_IPFor example:
ssh [email protected]Step 3: Accept the Host Key
On your first connection, you will see a message like:
The authenticity of host '203.0.113.50' can't be established.
ED25519 key fingerprint is SHA256:xxxxxxxxxxx.
Are you sure you want to continue connecting (yes/no/[fingerprint])?Type yes and press Enter. This adds the server to your known hosts file.
Step 4: Enter Your Password
Type your root password when prompted. Note that the cursor will not move as you type -- this is normal.
Tip: If you receive a "Permission denied" error, double-check your password. Passwords are case-sensitive.
Connecting from Windows 10/11 (Built-in OpenSSH)
Windows 10 (version 1809+) and Windows 11 include OpenSSH by default.
- Open PowerShell or Command Prompt
- Run:
ssh root@YOUR_VPS_IP- Accept the host key and enter your password when prompted
Using SSH Keys (Recommended)
SSH keys provide stronger security than passwords and allow password-less login.
Step 1: Generate an SSH Key Pair
ssh-keygen -t ed25519 -C "[email protected]"Press Enter to accept the default file location. Optionally set a passphrase for additional security.
Step 2: Copy the Public Key to Your VPS
ssh-copy-id root@YOUR_VPS_IPEnter your password one final time. After this, future connections will use key-based authentication.
Step 3: Verify Key-Based Login
ssh root@YOUR_VPS_IPYou should connect without being prompted for a password (unless you set a key passphrase).
Connecting on a Non-Standard Port
If your VPS SSH runs on a custom port (e.g., 2222):
ssh -p 2222 root@YOUR_VPS_IPUsing an SSH Config File
Simplify repeated connections by creating a config file:
nano ~/.ssh/configAdd an entry:
Host myvps
HostName YOUR_VPS_IP
User root
Port 22
IdentityFile ~/.ssh/id_ed25519Now connect with just:
ssh myvpsTroubleshooting
| Problem | Solution |
|---|---|
| Connection timed out | Check if VPS is running in client area; verify IP address; check firewall rules |
| Connection refused | SSH service may not be running; use VNC console from client area to restart sshd |
| Permission denied | Verify password; check if root login is enabled in /etc/ssh/sshd_config |
| Host key changed warning | Server was reinstalled; remove old key with ssh-keygen -R YOUR_VPS_IP |
Security Best Practices
- Disable root password login after setting up SSH keys
- Change the default SSH port from 22 to reduce automated attacks
- Use strong passphrases on your SSH keys
- Enable fail2ban to block brute-force attempts
- Keep your system updated with regular security patches
Related Articles
- Using PuTTY to Connect to Your VPS (Windows)
- Setting Up a Firewall on Your VPS (UFW/iptables)
- VPS Security Hardening Checklist
Need help connecting? Contact our support team at [email protected] or open a ticket at https://domainindia.com/support.