Mike MurphyAI Handyman
Subscribe
Back to tutorials

How to Connect Claude Code to a Hostinger VPS via SSH

January 1, 2026 ·

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:

What You Will Learn:

  1. Create custom SSH key
  2. Send public key to VPS
  3. Activate key on Mac
  4. Create server nickname
  5. Test connection
  6. Connect Claude to your VPS
  7. Manage servers with plain English
  8. 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

  1. Create SSH KEY:
    1. ssh-keygen -t ed25519 -C "hostinger-vps-key"
  2. Send Key To VPS:
    1. cat ~/.ssh/id_hostinger_vps.pub | pbcopy
  3. Add Public SSH Key To Hostinger VPS Dashboard
    1. Navigate to VPS → SSH Access
    2. Click “Add SSH Key”
    3. Paste key (Command + V)
    4. Label it “My Mac”
    5. Save
  4. Tell Mac To Use This Key
    1. ssh-add ~/.ssh/id_hostinger_vps
  5. Create Server Nickname (Edit Config File)
    1. nano ~/.ssh/config

Add This:

  • Host hostinger-vps
  • HostName YOUR_VPS_IP_ADDRESS
  • User root
  • IdentityFile ~/.ssh/id_hostinger_vps
  1. Test Connection
    1. ssh hostinger-vps

Phase 2: Launch Claude Code

  1. In MacOS Terminal, enter ‘claude’

  2. Tell Claude to ‘connect to hostinger-vps’

    1. List all running Docker containers
    2. Check disk usage
    3. Show system uptime and load averages
    4. Check for pending OS security updates
    5. Display memory usage
  3. 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

AI Unplugged · weekly

Newsletter for AI Builders

One practical email with the news, tools, terms, and tutorials worth remembering. Beehiiv sends it; Astro owns the archive.

No spam. Reply-friendly. Easy to leave.