Cmd+V screenshots from your Mac clipboard into VS Code remote terminals. The image is saved to the remote host and the file path is typed into the terminal — ready for Claude Code or any other tool.
While connected to a remote host via Remote-SSH, with a workspace folder open:
- You take a screenshot on your Mac (Cmd+Ctrl+Shift+4)
- You Cmd+V in a remote terminal in VS Code
- The extension saves the PNG to
.vscode-screenshots/in the workspace on the remote host - The file path is typed into the terminal (without pressing Enter)
- If the clipboard has text instead of an image, normal paste happens — no interference
The extension only activates when all three conditions are met: remote SSH session + terminal focused + image on clipboard. Otherwise it's invisible.
Perfect for Claude Code running on remote VMs — paste a screenshot and the path is ready for your prompt.
Install pngpaste on your Mac:
brew install pngpaste- macOS — uses
pngpastefor clipboard image reading - VS Code Remote-SSH — the extension runs locally on your Mac and writes files to the remote via
workspace.fs - An open workspace folder on the remote host
- Transparent Cmd+V — no new shortcuts to learn, just paste as normal
- Remote-first — files are saved on the remote host, not locally
- Auto git exclusion —
.vscode-screenshots/is added to.gitignoreautomatically (configurable) - Auto cleanup — screenshots older than 30 days are deleted (configurable)
- Non-intrusive — only activates in remote SSH terminals with an image on the clipboard. Local terminals, text paste, and non-remote sessions are completely unaffected
- Zero config — works out of the box, settings are optional
| Setting | Default | Description |
|---|---|---|
terminalScreenshotPaste.screenshotDir |
.vscode-screenshots |
Directory name in the workspace root for saving screenshots |
terminalScreenshotPaste.retentionDays |
30 |
Delete screenshots older than this many days. Set to 0 to keep forever. |
terminalScreenshotPaste.manageGitignore |
false |
Automatically add the screenshot directory to .gitignore |
If pasting doesn't work, check the output log: View → Output → select SSH Screenshot Paste from the dropdown.
Common issues:
- "pngpaste is not installed" — run
brew install pngpasteon your Mac - "No workspace folder open" — open a folder on the remote host (File → Open Folder)
- Normal paste happens instead of screenshot — make sure you copied to clipboard with Cmd+Ctrl+Shift+4 (not just Cmd+Shift+4, which saves to a file)
Issues and pull requests are welcome at github.com/hank-warren/ssh-clipboard-image.