Ctrl+V clipboard images straight into Claude Code, Codex CLI, or any terminal tool running over SSH.
Windows Terminal does not support pasting images into remote SSH sessions. This tool bridges that gap: it intercepts Ctrl+V, saves the clipboard image locally, uploads it to the remote host via scp, and inserts the remote file path into your terminal — all without leaving your current tab.
You are running Claude Code (or another AI coding assistant) on a remote Linux server via SSH. You want to paste a screenshot for context. You press Ctrl+V and… nothing useful happens. Windows Terminal has no way to send clipboard images over SSH.
cssh wraps your SSH connection and enables image pasting:
┌──────────────────────────────────────────────────────┐
│ Windows Terminal │
│ ┌────────────────────────────────────────────────┐ │
│ │ $ cssh user@server │ │
│ │ │ │
│ │ claude> describe this UI bug │ │
│ │ claude> /tmp/i/1.png ← Ctrl+V inserted this │ │
│ │ │ │
│ └────────────────────────────────────────────────┘ │
└──────────────────────────────────────────────────────┘
│ ▲
│ scp (background upload) │ ssh
▼ │
┌───────────┐ ┌─────────────┐
│ /tmp/i/ │ │ Claude Code │
│ 1.png │────────────────▶│ reads image │
└───────────┘ path ready └─────────────┘
When you press Ctrl+V inside a cssh session with an image on the clipboard:
- A short remote path is reserved (e.g.,
/tmp/i/1.png) - That path is typed into the terminal immediately
- The image is uploaded to the remote host in the background via
scp Enteris temporarily blocked until the upload finishes, so the tool does not try to read the file before it exists
- Same-tab SSH —
csshruns in your current Windows Terminal tab, no new windows - Instant path insertion — the path appears immediately, upload happens in the background
- Short paths —
/tmp/i/1.png,/tmp/i/2.png, … easy to type or reference - Window-scoped sessions — binding is tied to the Windows Terminal window handle
- PowerShell helpers —
cssh,cssh-status,cssh-on,cssh-off - AutoHotkey integration — a background watcher intercepts
Ctrl+Vonly when acsshsession is active
- Windows 10 or 11
- Windows Terminal
- PowerShell 5.1+ or PowerShell 7+
ssh.exeandscp.exeon PATH (included with Windows 10+)- AutoHotkey v2
- Passwordless SSH (key-based auth) recommended
Run from PowerShell on Windows:
git clone https://github.com/cyanyux/windows-terminal-ssh-image-paste.git
cd windows-terminal-ssh-image-paste
.\scripts\install.ps1To also install AutoHotkey v2 automatically:
.\scripts\install.ps1 -InstallAutoHotkeyThe installer:
- Copies scripts to
%USERPROFILE%\bin - Adds a managed block to your PowerShell profile
- Creates a Startup shortcut for the AutoHotkey watcher
- Starts the AutoHotkey watcher immediately
-
Open a PowerShell tab in Windows Terminal
-
Connect with
csshinstead ofssh:cssh user@host -
Copy an image to your Windows clipboard (screenshot, snip, etc.)
-
Press
Ctrl+V— the remote path appears in the terminal -
Wait briefly for the upload indicator, then press
Enter
| Command | Description |
|---|---|
cssh user@host |
Connect via SSH with image paste enabled |
cssh-here user@host |
Explicit alias for same-tab behavior |
cssh-status |
Show the current session binding |
cssh-on -Target user@host |
Manually bind the current tab to a host |
cssh-off |
Clear the current session binding |
.\scripts\uninstall.ps1To also remove local state and caches:
.\scripts\uninstall.ps1 -RemoveState.\scripts\smoke-test.ps1Checks PowerShell script syntax, AutoHotkey availability, and installation prerequisites.
bin/
ClaudeSsh.ps1 # SSH wrapper and session management
ClaudeSshImagePaste.ps1 # Image capture, upload, and path logic
ClaudeSshImagePaste.ahk # AutoHotkey Ctrl+V interceptor
scripts/
install.ps1 # Installer
uninstall.ps1 # Uninstaller
smoke-test.ps1 # Verification script
- Designed for terminal-based workflows, not GUI image attachment UIs
- The remote path is inserted before the upload finishes —
Enteris blocked during upload to prevent reading a missing file - Session binding is per-window, not per-tab. Avoid switching tabs between copy and paste if the window also has local WSL tabs
MIT