New customers: -30% on all services with code NEW
← Back to blog
Tutorial20 March 2026· 8 min read

How to connect to a Linux VPS via SSH

What is SSH?

SSH (Secure Shell) is the standard protocol for remotely connecting to a Linux server securely. All communication is encrypted.

Prerequisites

Before you start, you need:

  • Your VPS IP address (available in your VexCloud client area)
  • The username (usually root by default)
  • The password received by email, or your SSH key
  • Connecting from Windows

    Option 1: PowerShell or CMD (Windows 10/11)

    Windows 10 and 11 include a native SSH client. Open PowerShell and type:

    ssh root@YOUR_IP

    Replace YOUR_IP with your VPS IP address. Accept the server fingerprint by typing yes, then enter your password.

    Option 2: PuTTY (graphical client)

    PuTTY is the most popular SSH client on Windows. Download it from putty.org, then:

  • Host Name: enter your VPS IP
  • Port: 22
  • Connection type: SSH
  • Click Open
  • Connecting from Mac or Linux

    Open Terminal and type directly:

    ssh root@YOUR_IP

    Using SSH keys (recommended)

    SSH keys are more secure than passwords.

    Step 1: Generate the key pair

    ssh-keygen -t ed25519 -C "my-vexcloud-vps"

    Press Enter to accept the default location. Set a passphrase if desired.

    Step 2: Copy the key to your VPS

    ssh-copy-id root@YOUR_IP

    Step 3: Connect without a password

    ssh root@YOUR_IP

    Essential SSH commands

  • exit or Ctrl+D to disconnect
  • ssh -p 2222 root@IP for a non-standard port
  • scp file.txt root@IP:/root/ to copy a file to the server
  • Securing your SSH connection

    To protect your VPS from brute force attacks, edit /etc/ssh/sshd_config:

  • Disable root login: PermitRootLogin no
  • Disable passwords: PasswordAuthentication no
  • Change the port: Port 2222
  • Restart SSH after changes: systemctl restart sshd

    Get started

    Try VexCloud today

    EQUINIX PA6 Paris infrastructure · DDoS protection included · No commitment

    See VPS plans →