image paste in ssh/sftop
Status Fixed / completed
Maintainer reply ✓ Yes — bcherny
Workaround ✓ Mentioned in thread ↓
Activity 25 comments · opened Aug 6, 2025 · closed Aug 16, 2026
💡 Likely answer: A maintainer (bcherny, collaborator)
responded on this thread — see the highlighted reply below.
hi folks,
im on mac. i run my code on a remote server and connect to it using ssh. i also develop on this remote server since my code needs lot of cpus to compile. i use claude code cli to help development on this remote server.
i want to paste images so that claude code cli can understand the context. remember claude code cli is still running remotely on a remote linux server and im connecting using ssh.
what workaround does exist to paste image right into the claude code cli terminal in vscode/webstorm?
thank you in advance
25 Comments
Found 3 possible duplicate issues:
If your issue is a duplicate, please close it and 👍 the existing issue instead.
<sub>This issue will be automatically closed as a duplicate in 3 days if there are no additional comments. To prevent auto-closure, please 👎 this comment.</sub>
🤖 Generated with Claude Code
any updates on this? please provide a way to support this
I would love this...
I NEED THIS!
One silly work around if you use VS Code on a remote server is to paste the image into a markdown file in your home directory. That will add the image there too on the remote server and then you can command click to get the image displayed in VSCode and then get the path and paste that into claude.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
I really would love to have this feature
Bump!
I built an open-source tool to solve this: cc-clip
It creates a transparent bridge between your local Mac clipboard and the remote server via SSH tunnel. An xclip shim intercepts only Claude Code's clipboard calls and fetches image data from a local daemon — no changes to Claude Code needed.
Setup is two commands:
After that,
Ctrl+Vin remote Claude Code pastes images from your Mac as if it were local.I built a tool that solves this: cc-clip
It creates a transparent bridge between your local Mac clipboard and the remote server using an HTTP daemon + SSH RemoteForward + an xclip shim. No changes to Claude Code needed.
One command handles everything (deps, SSH config, daemon, remote deploy). After that, Ctrl+V in remote Claude Code pastes images from your local Mac.
Works on macOS → Linux (amd64/arm64). MIT licensed — feedback and bug reports welcome.
Still seeing this issue happening over a ssh'd terminal.
i ssh from my local windows to remote linux machine.
@ShunmeiCho this is an amazing tool, thanks for creating it!
clipaste now supports SSH remote paste (v2.1.0).
It runs an HTTP server locally that serves your latest screenshot. One-time setup:
This installs an xclip shim on the remote server and configures SSH
RemoteForward. After setup, Ctrl+V in remote Claude Code fetches the screenshot through the SSH tunnel.No extra tools needed on the server (just
curl). Works with any Linux server.You can try Cmux terminal (based on Ghostty) - it has this feature by default. But before, I used just a script which uploads the image from clipboard to remote server and copies the path of the image to clipboard, so I just paste it to claude code - i.e. Screenshot -> shortcut (cmd+shift+i) -> uploaded to the server -> path copied to clipboard (@~/uploads/clip-20260429-072938.png) -> paste to claude code. I use Raycast to execute the script
Try this util - https://github.com/samuellawrentz/clipssh
I really would love to have this feature
I have this same issue:
Clipboard Paste Issue (Claude Code over SSH)
Setup
Symptom
Ctrl+V stopped working for both text and images in Claude Code. Error: "No image found on the clipboard." Started failing around 2026-06-17.
Cmd+V works for text (Prompt handles it locally and injects as raw input).
What we know
allow-passthrough on— tmux is not obviously the culpritConfirmed (2026-06-17)
Tested without tmux — same failure. Tested with iTerm2 instead of Prompt — same failure. Neither tmux nor the SSH client is the culprit. This is a Claude Code regression: Ctrl+V is intercepted by Claude Code and attempts to read the clipboard on the remote machine (which has none over SSH). Previously Ctrl+V passed through to the terminal.
Workarounds
Has anyone considered a kitty-clipboard style approach to this? A reasonably simple in-band way to support image paste without external configuration, tunnels, daemons, etc.... Originally posted (and closed) here, this seems to be the most elegant solution for terminals that support the protocol....
https://github.com/anthropics/claude-code/issues/42712
the mechanism is DEC private mode 5522 (kitty's OSC 5522 clipboard protocol plus a paste-notification extension). It's fully in-band and opt-in:
Why this beats the daemon / reverse-tunnel workarounds people are using today:
I maintain a terminal emulator that already implements the kitty clipboard protocol / OSC 5522, so I'm happy to be a conformance test partner for the terminal side if this gets picked up.
Spec: https://rockorager.dev/misc/bracketed-paste-mime/
kitty clipboard protocol: https://sw.kovidgoyal.net/kitty/clipboard/
Author here — for macOS users who prefer not to run a clipboard daemon, reverse tunnel, or remote clipboard shim, I built an open-source workaround that automates the script workflow mentioned above:
https://github.com/SerenityTn/ssh-img-paste
SSH Image Paste reads the image or screenshot from the Mac clipboard, uploads it using the existing OpenSSH configuration, and puts the resulting remote path on the clipboard for pasting into remote Claude Code.
Install with:
brew install SerenityTn/tap/ssh-img-pasteIt does not make native Ctrl+V image transport work; native in-band support would still be the best long-term solution. This is a Mac-only practical workaround for avoiding the repeated save → scp → copy-path steps.
When Claude Code runs on a remote machine over SSH, the image is on your local clipboard and the CLI can't see it, so paste won't work. Two options:
scp) and give Claude the path: "Look at /tmp/screenshot.png". See https://code.claude.com/docs/en/common-workflows#work-with-imagesClosing as answered.
🤖 Generated with Claude Code
I am trying to reply with my approach, but I'm getting errors from GitHub
and don't know why. Claude and I came up with an alternative: we wrote a
local shell script that calls my Mac's native screenshot app, records the
shot, scp's it over to my development machine and then loads the path onto
my clipboard so I can paste it in to my SSH session. I wired it up as a
Quick Action in Automator and it works like a charm.
-SD
[image: photo]
Seth Dimbert
Consultant, MRD: Education. Technology.
[image: icon] www.misterd.net [image: icon] @.***
[image: facebook] <https://facebook.com/sethdimbert>
[image: linkedin] <https://www.linkedin.com/in/sethdimbert>
[image: twitter] <https://twitter.com/misterd>
[image: __tpx__]
On Sun, Aug 16, 2026 at 6:54 PM Boris Cherny @.***>
wrote:
I came up with a workaround for AbsoluteTelnet/SSH. If you're using version 14 or above, you can just paste screenshots and files into Claude Code over SSH. Behind the scenes, it uses an SFTP channel across the current already open session and pastes the file location into the Claude chat. Like the other workarounds above, it delivers the file outside of the terminal, but unlike the solutions above, doesn't require additional connection/authentication. Also, it requires no additional setup or configuration. It should 'just work'. I still would prefer Kitty clipboard (OSC 5522) in-band in the tty session, which should work in all terminal sessions, not just SSH....
<img width="725" height="138" alt="Image" src="https://github.com/user-attachments/assets/abd8bdcc-4cb7-4eb7-83d1-0eaa0679275f" />
Brian Pence
Celestial Software
+1 for OSC 5522 support. I hate having to have to spin up daemon's and services to copy over files. OSC 5522 is starting to be implemented in other terminals, and should be included in claude code
The official workaround is basically
scpthe file over and give Claude the path. I wanted the same thing, just without having to do those steps manually every time.I ended up building
vmupfor it. It collects the files locally, uploads them over your existing OpenSSH setup into one~/vmup/agents-…/folder, then copies a prompt with that path to your clipboard. It also cleans up old uploads automatically.Works with multiple files too, so I can send a screenshot, PDF, etc. together:
https://github.com/nyxsky404/vmup
Native OSC 5522 would still be nicer for directly pasting a single screenshot. I mostly use this when I need to get several files onto the remote machine at once.
I created this page to demonstrate how its done in AbsoluteTelnet/SSH. No extra software, no daemons, etc.... If you have SFTP enabled, it 'just works':
https://www.celestialsoftware.net/claude-code-in-absolutetelnet-ssh/