SSH Login to Your Hetzner VPS
Step 1: Get Your Server’s IP Address
From the Hetzner Cloud Console, copy your server’s IPv4 address.
Example: 123.45.67.89
Step 2: Open Terminal
- Linux/macOS: Open Terminal
- Windows: Use PowerShell, Windows Terminal, or install WSL
Step 3: SSH Login Command
Basic Login
ssh root@YOUR_SERVER_IP
Replace YOUR_SERVER_IP with your actual IP address.
Example:
ssh root@123.45.67.89
First Time Connection
You’ll see a message like:
The authenticity of host '123.45.67.89' can't be established.
ED25519 key fingerprint is SHA256:xxxxxxxxxxxxxxxxxxxxx
Are you sure you want to continue connecting (yes/no/[fingerprint])?
Type yes and press Enter.
Step 4: Authentication
If You Added SSH Key (Recommended)
You’ll login automatically - no password needed! ✅
If You Didn’t Add SSH Key
You’ll be prompted for the root password. Find it in:
- Hetzner Cloud Console → Your Server → Access tab
- Email from Hetzner (sent when server was created)
Step 5: Verify You’re Logged In
After successful login, you’ll see:
root@your-server-name:~#
You’re now logged into your VPS as root! 🎉
Troubleshooting
Permission Denied (publickey)
Your SSH key isn’t configured. Either:
- Add your SSH key in Hetzner console and rebuild server
- Use password authentication if available
Connection Refused
- Server might still be starting (wait 30 seconds)
- Check if you’re using correct IP address
- Firewall might be blocking (unlikely on fresh Hetzner VPS)
Connection Timeout
- Check your internet connection
- Verify IP address is correct
- Try from different network (corporate firewalls sometimes block SSH)
Better SSH Configuration (Optional)
Create/edit ~/.ssh/config on your local machine:
Host homelab-vps
HostName 123.45.67.89
User root
IdentityFile ~/.ssh/id_ed25519
Then you can login simply with:
ssh homelab-vps