This guide will walk you through setting up a remote-accessible Claude Code environment using tmux, Bitvise SSH Server, and playit.gg so you can attach to your running Claude session from another PC or your phone.
-
Install Bitvise SSH Server Download: https://bitvise.com/ssh-server-download
-
Install MSYS2 (bash shell for Windows) Download: https://www.msys2.org/
-
Install tmux in MSYS2
C:\msys64\usr\bin\bash.exe -lc "pacman -S --noconfirm tmux"
-
Install playit.gg (creates a public tunnel to your SSH server) Download: https://playit.gg/download
-
In Bitvise, set MSYS2 as the default shell:
- Open Bitvise SSH Server Control Panel
- Go to Open easy settings → Terminal Shell
- Set it to:
C:\msys64\usr\bin\bash.exe -l
-
(Optional) Create a launch script to auto-start tmux + Claude when you connect (see section 4).
-
Install WSL (Ubuntu recommended)
wsl --install -d Ubuntu
-
Install tmux in WSL
sudo apt update && sudo apt install -y tmux -
Install Bitvise SSH Server (Download here)
-
Install playit.gg (Download here)
-
In Bitvise, set WSL as the default shell:
- Open Bitvise SSH Server settings → Terminal shell
- Example:
wsl.exe -d Ubuntu
-
Create a launch script to start tmux + Claude (see section 4).
-
Sign up at https://playit.gg and log in.
-
Download and run the playit.gg client on your PC.
-
In the dashboard, create a new tunnel:
- Type: TCP
- Port: 22 (SSH)
-
Copy the public hostname/IP from the dashboard.
From another device:
ssh yourusername@PUBLIC_IP_FROM_PLAYITGGExample:
If successful, you should see your shell prompt.
These scripts will attach to your tmux session if it exists or create one if it doesn’t.
Save this as attach.ps1 and place it somewhere in your PATH.
$msysBash = 'C:\msys64\usr\bin\bash.exe'
$serverName = 'cc'
$session = 'main'
$workDir = '/c/Projects'
$pwshCmd = "/usr/bin/winpty /c/Progra~1/PowerShell/7/pwsh.exe -NoLogo -NoExit -WorkingDirectory C:/Projects -Command claude"
$tmuxScript = "tmux -L $serverName has-session -t $session 2>/dev/null || tmux -L $serverName new-session -d -s $session -c $workDir '$pwshCmd'; exec winpty /usr/bin/tmux -L $serverName attach -t $session"
& "$msysBash" -lc "$tmuxScript"Run it:
attach.ps1Save as attach.cmd:
@echo off
set MSYSBASH=C:\msys64\usr\bin\bash.exe
%MSYSBASH% -lc "tmux -L cc has-session -t main 2>/dev/null || tmux -L cc new-session -d -s main -c /c/Projects '/usr/bin/winpty /c/Progra~1/PowerShell/7/pwsh.exe -NoLogo -NoExit -WorkingDirectory C:/Projects -Command claude'; exec winpty /usr/bin/tmux -L cc attach -t main"Run it:
attach.cmdSave as attach.sh in your WSL home:
#!/bin/bash
SESSION=main
WORKDIR=/mnt/c/Projects
CMD="zsh -lic claude"
tmux has-session -t "$SESSION" 2>/dev/null || tmux new-session -d -s "$SESSION" -c "$WORKDIR" "$CMD"
tmux attach -t "$SESSION"Make executable:
chmod +x attach.shRun it:
./attach.shOnce the above is set up:
-
Install an SSH client on your phone or PC (Termius, Blink Shell, etc.).
-
Connect using the playit.gg public IP:
ssh yourusername@PUBLIC_IP_FROM_PLAYITGG
-
Run:
attach
-
You will be in the same Claude Code session as on your main PC.
✅ You can now code with Claude remotely from anywhere!
