Skip to content

Remote Claude Code Access for Windows - SSH + tmux solution

License

Notifications You must be signed in to change notification settings

baboonzero/remote-cli

Repository files navigation

Remote CLI - Remote Claude Code Access for Windows

This project provides scripts and documentation for setting up remote access to Claude Code sessions running on your Windows laptop, allowing you to connect and control them from your phone or other devices.

Overview

This solution enables you to:

  • Run Claude Code sessions on your Windows laptop
  • Connect remotely from your phone via SSH
  • Maintain persistent sessions that survive disconnections
  • Resume sessions from anywhere

Methods Available

1. WSL + SSH + tmux (Recommended)

The most robust solution for Windows users. Uses Windows Subsystem for Linux (WSL) with tmux for session persistence and SSH for remote access.

Pros:

  • Full tmux support for persistent sessions
  • Native Linux experience
  • Best compatibility with Claude Code
  • Easy to maintain

Cons:

  • Requires WSL setup

2. Official Claude Mobile App

The simplest method - Anthropic's native iOS app runs Claude Code in the cloud.

Pros:

  • No setup required
  • Runs in cloud (no local machine needed)
  • Native mobile experience

Cons:

  • Limited to mobile app features
  • Requires internet connection

3. Native Windows SSH + PowerShell

Use Windows' built-in OpenSSH server with PowerShell sessions.

Pros:

  • No WSL needed
  • Uses native Windows tools

Cons:

  • No tmux (limited session persistence)
  • Less robust than WSL method

Quick Start

Method 1: WSL + SSH + tmux (Recommended)

  1. Install WSL on your Windows laptop:

    wsl --install
  2. Run the setup script:

    cd remote-cli
    ./setup-wsl-ssh.sh
  3. Configure your firewall (see detailed guide)

  4. Connect from your phone using an SSH client like Termius

See WSL_SETUP.md for detailed instructions.

Method 2: Native Windows SSH

  1. Run the PowerShell setup script as Administrator:

    .\setup-windows-ssh.ps1
  2. Configure Windows Firewall

  3. Connect from your phone

See WINDOWS_SSH_SETUP.md for detailed instructions.

Project Structure

remote-cli/
├── README.md                          # This file
├── QUICKSTART.md                      # Quick start guide
├── LICENSE                            # MIT License
├── .gitignore                         # Git ignore rules
├── setup-wsl-ssh.sh                   # WSL setup script
├── setup-windows-ssh.ps1              # Windows setup script
├── wsl-port-forward.ps1               # WSL port forwarding script
├── config/
│   ├── tmux.conf                      # tmux configuration
│   └── sshd_config.example            # SSH server config example
├── scripts/
│   ├── start-claude-session.sh        # Start a new Claude Code session
│   ├── connect-claude.sh              # Connect to existing session
│   └── check-sessions.sh              # List all active sessions
└── docs/
    ├── WSL_SETUP.md                   # Detailed WSL setup guide
    ├── WINDOWS_SSH_SETUP.md           # Detailed Windows SSH guide
    ├── MOBILE_CLIENTS.md              # Guide for mobile SSH clients
    └── TROUBLESHOOTING.md             # Common issues and solutions

Usage

Starting a Claude Code Session

On your Windows laptop (in WSL or PowerShell):

./scripts/start-claude-session.sh

Connecting from Your Phone

  1. Install Termius (or another SSH client) on your phone
  2. Add your laptop's IP address
  3. Connect via SSH
  4. Attach to your session:
    tmux attach -t claude-session

Managing Sessions

List all active sessions:

./scripts/check-sessions.sh

Connect to a specific session:

./scripts/connect-claude.sh session-name

Security Considerations

  • Use SSH key authentication (not passwords)
  • Configure Windows Firewall to only allow connections from trusted networks
  • Consider using a VPN for remote access over the internet
  • Keep your SSH server updated

Requirements

For WSL Method:

  • Windows 10/11 with WSL2
  • OpenSSH Server
  • tmux
  • Claude Code CLI installed

For Native Windows Method:

  • Windows 10/11
  • OpenSSH Server (built-in)
  • Claude Code CLI installed

Contributing

Feel free to submit issues or pull requests to improve these scripts and documentation.

License

MIT License - See LICENSE file for details

About

Remote Claude Code Access for Windows - SSH + tmux solution

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published