Your Computer Doesn't Matter Anymore - Claude Code SSH

Study Guide

Overview

This video by Leon van Zyl demonstrates how to run Claude Code on a remote VPS (Virtual Private Server) using the SSH connection feature in Claude Code Desktop. Instead of running Claude Code locally on your laptop or desktop, you can connect to a cloud server, giving you more flexibility, better hardware resources, and the ability to access your projects from any device.

Why Use a VPS for Claude Code?

Always-On Availability

When you run everything locally, shutting down your computer means stopping all processes. A VPS stays running in the cloud 24/7. Claude Code can continue making changes even when your personal machine is powered off. If you lose your local machine, your code is safe on the server.

Keep Your Local Machine Clean

Instead of installing project dependencies, databases, and toolchains on your personal computer, you move everything to the VPS. Your local machine only needs Claude Code Desktop installed, which connects remotely to the server where all the heavy lifting happens.

Access More Powerful Hardware

If your project requires significant compute resources (game development, machine learning, large builds), your local hardware may be a bottleneck. A VPS can be provisioned with more CPU, RAM, and storage than your personal device offers.

Multi-Device Access

Because the code and Claude Code live on the VPS, you can connect from your laptop, your work PC, or any other device. You are no longer tied to a single machine. This is especially useful if you switch between devices throughout the day.

Step-by-Step Setup

Step 1: Provision a VPS

You need a remote server. Options include spinning up an AWS EC2 instance, using DigitalOcean, or using a VPS provider like Hostinger. The video demonstrates Hostinger, which provides a dashboard and built-in terminal access.

Step 2: Install Claude Code on the VPS

Connect to your VPS terminal and run the Claude Code installation command. After installing, update your PATH variable and run source ~/.profile to make the claude command available. Then authenticate Claude Code using your subscription or API tokens.

Step 3: Gather Connection Details

On the VPS, run whoami to get the username (typically root). Note the server's IPv4 address from your VPS dashboard. The SSH port is 22 by default.

Step 4: Generate an SSH Key on Your Local Machine

On your local computer (Windows, Mac, or Linux), open a terminal and run:

ssh-keygen -t [type] -C "your label"

Press Enter through the prompts to accept defaults. This creates a public/private key pair in your ~/.ssh/ directory.

Step 5: Copy the Public Key to the VPS

Copy the contents of your public key file (the one ending in .pub). On Windows, use clip; on Mac, use pbcopy. Then on the VPS terminal, run these commands:

  • mkdir -p ~/.ssh
  • echo "YOUR_PUBLIC_KEY" >> ~/.ssh/authorized_keys
  • chmod 700 ~/.ssh
  • chmod 600 ~/.ssh/authorized_keys

Step 6: Configure Claude Code Desktop

In Claude Code Desktop, go to the Code tab, start a new session, and click "Add SSH Connection." Fill in the fields:

  • Name: Any friendly label (e.g., "My Remote Server")
  • User: Your VPS username (e.g., root)
  • Host: The VPS IPv4 address
  • Port: 22
  • Identity File: Path to your private key, e.g., ~/.ssh/id_[name] (without the .pub extension)

Step 7: Connect and Start Working

Create a new session, select the remote server connection, choose a folder on the remote machine, and trust the workspace. You are now running Claude Code on the VPS through Claude Code Desktop on your local machine.

Key Takeaways

  • The SSH feature in Claude Code Desktop lets you offload all development work to a cloud server.
  • Your local computer becomes a thin client, only needing Claude Code Desktop installed.
  • VPS setups are ideal for resource-heavy projects, multi-device workflows, and always-on development environments.
  • The setup process involves generating SSH keys locally, copying the public key to the server, and configuring the connection in Claude Code Desktop.
  • Once connected, you can create project directories on the VPS and work as if everything were local.
YouTube