TemperStack
Intermediate12 min readUpdated Mar 13, 2026

How to connect via SSH on Contabo

Quick Answer

Connect to your Contabo server using ssh root@SERVER_IP on Linux/Mac or PowerShell/PuTTY on Windows, accept the fingerprint, and enter your password. For security, generate and upload SSH keys to enable key-based authentication instead of passwords. Troubleshoot connection refused errors by checking server status, firewall, and port in the Control Panel.

Prerequisites

  1. Contabo Customer Control Panel access
  2. Server IP address and root password
  3. SSH client (Terminal, PowerShell, PuTTY or Git Bash)
  4. Basic command-line knowledge
1

Verify Prerequisites and Server Status

Before connecting, log into the Contabo Customer Control Panel to confirm your server's IP address, status (ensure it's running), username (typically root for Linux), and password. Reset password if forgotten via the panel. Temporarily disable local firewall/antivirus for testing. Default SSH port is 22.
Tip
Use VNC access from Control Panel if SSH fails initially.
2

Connect from Windows (PowerShell or Git Bash)

Open PowerShell (Windows Key + type 'PowerShell') or install Git Bash for SSH. Run ssh root@YOUR_SERVER_IP. For custom port: ssh -p PORT root@YOUR_SERVER_IP. Type yes to accept the host fingerprint on first connection, then enter your password (no characters display while typing).
3

Connect from Linux or macOS

Open Terminal and run ssh -l root -p 22 YOUR_SERVER_IP or simply ssh root@YOUR_SERVER_IP. Accept the SSH certificate by typing yes on first connection. Enter your password when prompted.
Tip
Paste password carefully without trailing spaces.
4

Generate SSH Key Pair (Linux/macOS)

For secure key-based auth, open Terminal and run ssh-keygen -t ed25519. Press Enter to accept default location (~/.ssh/id_ed25519). Add a passphrase for extra security. This creates private (id_ed25519) and public (id_ed25519.pub) keys.
Tip
Never share your private key; store securely.
5

Generate SSH Keys on Windows (PuTTYgen)

Download and install PuTTY/PuTTYgen. Open PuTTYgen, click 'Generate', move mouse for randomness. Add key comment and passphrase. Save public and private keys. Copy public key text starting with ssh-ed25519 or ssh-rsa.
6

Upload Public Key to Server

Connect via SSH password first. Run mkdir -p ~/.ssh if needed. Edit vi ~/.ssh/authorized_keys or nano ~/.ssh/authorized_keys, paste public key (one per line), save with :wq (vi) or Ctrl+O/X (nano). Alternatively, use ssh-copy-id -p 22 root@YOUR_IP.
Tip
Preload keys during OS reinstall via Control Panel.
7

Connect Using SSH Keys

On Linux: ssh -i ~/.ssh/id_ed25519 root@YOUR_IP. On Windows PuTTY: Load private key in Connection > SSH > Auth. Now connect without password; enter key passphrase if set.
Tip
Disable password auth in /etc/ssh/sshd_config after setup for security.
8

Change SSH Port (Optional)

Edit vi /etc/ssh/sshd_config, uncomment/find Port 22, change to 1024-65536 (e.g., Port 2222). Save/exit, run systemctl restart ssh. Update firewall: ufw allow 2222/tcp. Connect with ssh -p 2222 root@IP.
9

Apply Security Best Practices

Use keys over passwords, add passphrase to keys, keep keys safe. Regularly update server and SSH config. Consider fail2ban for brute-force protection.
Tip
Check /etc/ssh/sshd_config for PasswordAuthentication no after keys.

Troubleshooting

Connection refused
Check server status/restart in Control Panel, verify IP/port (default 22), ensure SSH service running, check firewall/ufw allows port, use VNC for access.
Permission denied (password)
Reset password via Control Panel, ensure no trailing spaces when pasting, confirm root username.
Warning: Remote host identification changed
Remove old key: ssh-keygen -R SERVER_IP, then reconnect.
Fail2ban or IP banned
Use VNC/Control Panel to unban IP or reset via panel.
Can't connect after OS reinstall
Resend password via Control Panel, preload SSH keys during reinstall.

Related Guides

More Contabo Tutorials

Other Tool Tutorials

Ready to get started with Contabo?

Put this tutorial into practice. Visit Contabo and follow the steps above.

Visit Contabo