StarDomain

How to Connect to Your VPS via SSH

How to Connect to Your VPS via SSH

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:

  1. Your VPS IP address - found in your {{COMPANY_NAME}} client area under VPS services
  2. Root password or SSH key - provided during VPS provisioning
  3. 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:

bash
ssh root@YOUR_VPS_IP

For example:

bash
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.

  1. Open PowerShell or Command Prompt
  2. Run:
powershell
ssh root@YOUR_VPS_IP
  1. Accept the host key and enter your password when prompted

SSH keys provide stronger security than passwords and allow password-less login.

Step 1: Generate an SSH Key Pair

bash
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

bash
ssh-copy-id root@YOUR_VPS_IP

Enter your password one final time. After this, future connections will use key-based authentication.

Step 3: Verify Key-Based Login

bash
ssh root@YOUR_VPS_IP

You 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):

bash
ssh -p 2222 root@YOUR_VPS_IP

Using an SSH Config File

Simplify repeated connections by creating a config file:

bash
nano ~/.ssh/config

Add an entry:

Host myvps
    HostName YOUR_VPS_IP
    User root
    Port 22
    IdentityFile ~/.ssh/id_ed25519

Now connect with just:

bash
ssh myvps

Troubleshooting

ProblemSolution
Connection timed outCheck if VPS is running in client area; verify IP address; check firewall rules
Connection refusedSSH service may not be running; use VNC console from client area to restart sshd
Permission deniedVerify password; check if root login is enabled in /etc/ssh/sshd_config
Host key changed warningServer was reinstalled; remove old key with ssh-keygen -R YOUR_VPS_IP

Security Best Practices

  1. Disable root password login after setting up SSH keys
  2. Change the default SSH port from 22 to reduce automated attacks
  3. Use strong passphrases on your SSH keys
  4. Enable fail2ban to block brute-force attempts
  5. Keep your system updated with regular security patches

  • 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 {{SUPPORT_EMAIL}} or open a ticket at {{SUPPORT_URL}}.