Skip to content

How to Connect to Your Server via SSH

Connect with password or SSH keys from macOS, Linux, or Windows—and resolve refused connections and permission errors.

SSH (Secure Shell) provides encrypted command-line access to your server for deployments, log review, and configuration. SerVee IT VPS and dedicated plans include SSH; shared hosting may offer SSH on request or via jailed access. This guide covers keys, first login, and everyday safety.

Requirements

  • Server IP or hostname and SSH port (default 22).
  • Username (often root on VPS, or a subscription user on Plesk).
  • Password and/or SSH private key.

Generate an SSH Key (Local Machine)

ssh-keygen -t ed25519 -C "[email protected]" -f ~/.ssh/id_ed25519_serveeit

Press Enter for no passphrase on automated jobs, or set a passphrase for interactive use. OpenSSH documentation: OpenSSH manual.

Install Public Key on Server

Copy the public key to the server (replace user and host):

ssh-copy-id -i ~/.ssh/id_ed25519_serveeit.pub [email protected]

Or manually append to ~/.ssh/authorized_keys with permissions 700 on .ssh and 600 on authorized_keys.

Tip: Add a ~/.ssh/config stanza for shorter logins:
Host serveeit-prod
    HostName 203.0.113.10
    User deploy
    IdentityFile ~/.ssh/id_ed25519_serveeit
    Port 22

First Connection

ssh [email protected]
# Or with config:
ssh serveeit-prod

Verify the host key fingerprint when prompted on first connect. SerVee IT provides the expected fingerprint in onboarding when applicable.

Common Tasks Over SSH

  • View logs: tail -f /var/log/nginx/error.log
  • Restart services: sudo systemctl reload nginx
  • WordPress CLI: wp plugin list --path=/var/www/vhosts/example.com/httpdocs
  • File edits: nano, vim, or edit locally and deploy via SFTP/git

Security

  • Disable root password login after key-based root access is confirmed (VPS).
  • Use AllowUsers or firewall rules to limit SSH source IPs when possible.
  • Keep the server patched: sudo dnf update or apt upgrade.
Warning: Never share private keys or commit them to repositories. Compromised keys grant full server access.

Plesk and cPanel SSH

Enable SSH in the panel if disabled. Plesk: Websites & Domains → Web Hosting Access → SSH access. cPanel: Manage Shell Access or terminal in Manage Shell Access.

Summary

Generate an Ed25519 key pair, install the public key on the server, connect with ssh, and follow least-privilege practices. SerVee IT support can enable SSH, confirm port and user, and advise on key-only authentication for production environments.