How to Connect Claude Code to a Hostinger VPS via SSH
January 1, 2026 · Mike Murphy
In this tutorial, you will learn how to connect Claude Code to a Hostinger VPS using SSH and the macOS Terminal.
Description
In this tutorial, you will learn how to connect Claude Code to a Hostinger VPS using SSH and the macOS Terminal.
📌 Links:
- Get Hostinger VPS + n8n: https://www.hostg.xyz/SHIDN
- SSH Keys (Tutorial): https://youtu.be/6–d2faQSFY
- What the Heck is Traefik?: https://youtu.be/i515M0FwK7s
What You Will Learn:
- Create custom SSH key
- Send public key to VPS
- Activate key on Mac
- Create server nickname
- Test connection
- Connect Claude to your VPS
- Manage servers with plain English
- Real workflow examples
Real-world Use Case:
- Check server health
- Monitor container status
- Review disk space
- Audit security
- Deploy new containers
- Update applications
- Verify services running
- Roll back if needed
- Investigate errors
- Check logs
- Test connectivity
- Find bottlenecks
🪜What You Will Learn:
Phase 1: SSH Setup
- Create SSH KEY:
ssh-keygen -t ed25519 -C "hostinger-vps-key"
- Send Key To VPS:
cat ~/.ssh/id_hostinger_vps.pub | pbcopy
- Add Public SSH Key To Hostinger VPS Dashboard
- Navigate to VPS → SSH Access
- Click “Add SSH Key”
- Paste key (Command + V)
- Label it “My Mac”
- Save
- Tell Mac To Use This Key
ssh-add ~/.ssh/id_hostinger_vps
- Create Server Nickname (Edit Config File)
nano ~/.ssh/config
Add This:
- Host hostinger-vps
- HostName YOUR_VPS_IP_ADDRESS
- User root
- IdentityFile ~/.ssh/id_hostinger_vps
- Test Connection
ssh hostinger-vps
Phase 2: Launch Claude Code
-
In MacOS Terminal, enter ‘claude’
-
Tell Claude to ‘connect to hostinger-vps’
- List all running Docker containers
- Check disk usage
- Show system uptime and load averages
- Check for pending OS security updates
- Display memory usage
-
Exit when finished
⏰ Timestamps:
00:00 Intro: About The Tutorial
00:23 What You Will Learn
01:30 Why This Setup?
02:50 Step 1: Create SSH Key
04:15 .SSH Directory (Folder)
04:58 List SSH Keys (Terminal Command)
05:28 Step 2: Send Key To VPS
07:09 Step 3: Tell Mac To Use SSH Key
07:45 Step 4: Create Server Nickname
08:32 Edit Config File in Nano Editor
09:57 IP Address & User Name (VPS)
11:10 Step 5: Test SSH Connection
13:45 System Restart Using Terminal
15:06 Phase 2: Claude Code
16:32 Chat with Claude Code about VPS
18:16 Update VPS Using Claude Code
19:37 Clean Up VPS Disk Space (Claude Code)
23:36 Termius (SSH Client) vs. Terminal