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.
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
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
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
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
-
Install WSL on your Windows laptop:
wsl --install -
Run the setup script:
cd remote-cli ./setup-wsl-ssh.sh -
Configure your firewall (see detailed guide)
-
Connect from your phone using an SSH client like Termius
See WSL_SETUP.md for detailed instructions.
-
Run the PowerShell setup script as Administrator:
.\setup-windows-ssh.ps1
-
Configure Windows Firewall
-
Connect from your phone
See WINDOWS_SSH_SETUP.md for detailed instructions.
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
On your Windows laptop (in WSL or PowerShell):
./scripts/start-claude-session.sh- Install Termius (or another SSH client) on your phone
- Add your laptop's IP address
- Connect via SSH
- Attach to your session:
tmux attach -t claude-session
List all active sessions:
./scripts/check-sessions.shConnect to a specific session:
./scripts/connect-claude.sh session-name- 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
- Windows 10/11 with WSL2
- OpenSSH Server
- tmux
- Claude Code CLI installed
- Windows 10/11
- OpenSSH Server (built-in)
- Claude Code CLI installed
Feel free to submit issues or pull requests to improve these scripts and documentation.
MIT License - See LICENSE file for details