Managing your Linux VPS or dedicated server demands robust security, and SSH key authentication is the gold standard for secure, passwordless access. Unlike traditional passwords, SSH keys use strong encryption to provide faster, safer logins, ideal for both manual access and automated workflows. For example, setting up SSH keys for your ava.hosting VPS ensures secure access to your web server while enabling seamless integration with tools like Git or Ansible. This guide walks you through generating, adding, and using SSH keys for new or existing servers, optimized for ava.hosting’s high-performance infrastructure.
An SSH key pair consists of two parts:
When you connect via SSH, your system proves it holds the private key, and the server grants access — no password needed.
Feature | Benefit |
---|---|
Strong encryption | Near-impossible to brute-force |
No password storage | Eliminates risk of leaked or reused passwords |
Faster login | Instant authentication |
Automation friendly | Ideal for scripts, Git, Ansible, CI/CD tools |
You can add your SSH key during the VPS creation process — it’s fast and secure.
💡 You can add multiple keys if multiple users or devices need access.
Already have a running server? Here’s how to manually add your public key:
On your local machine (Linux/macOS/WSL/Windows Terminal):
Use this command to display your public key:
Or copy it directly to your VPS:
Replace username (usually root) and your-server-ip.
If ssh-copy-id is unavailable, log in with a password and run:
Paste your public key, save the file, then:
Done — you can now log in without entering a password.
Once your public key is on the server, connect like this:
If you saved your key under a custom filename:
Location | Purpose |
---|---|
~/.ssh/id_ed25519 | Your private key (keep secure!) |
~/.ssh/id_ed25519.pub | Public key (safe to share) |
/root/.ssh/authorized_keys | VPS location for access |
For extra protection, disable password authentication entirely:
nano /etc/ssh/sshd_config
PasswordAuthentication no
PermitRootLogin prohibit-password
systemctl restart sshd
⚠ Only do this once your key login is confirmed working.
SSH key authentication is the cornerstone of secure, passwordless access to your ava.hosting VPS or dedicated server. By eliminating password vulnerabilities and enabling fast, encrypted logins, SSH keys are ideal for both manual management and automated workflows. For example, you can use SSH keys to securely deploy updates to a Node.js app on your server or automate backups with rsync
. With this guide you can set up SSH keys in minutes, ensuring a secure, scalable, and efficient server management experience.