image paste in ssh/sftop

Open 💬 17 comments Opened Aug 6, 2025 by lsntkadev

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

View original on GitHub ↗

17 Comments

github-actions[bot] · 11 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/2500
  2. https://github.com/anthropics/claude-code/issues/1361
  3. https://github.com/anthropics/claude-code/issues/1989

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

SergioKingOne · 7 months ago

any updates on this? please provide a way to support this

johnMocingbird · 7 months ago

I would love this...

gurucodersro · 6 months ago

I NEED THIS!

ejc3 · 6 months ago

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.

github-actions[bot] · 5 months ago

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.

sandipndev · 4 months ago

I really would love to have this feature

Ridhamz-nd · 4 months ago

Bump!

ShunmeiCho · 4 months ago

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.

Local Mac clipboard → pngpaste → HTTP daemon → SSH RemoteForward → xclip shim → Claude Code

Setup is two commands:

cc-clip serve          # local: start clipboard daemon
cc-clip connect host   # deploy shim + tunnel to remote

After that, Ctrl+V in remote Claude Code pastes images from your Mac as if it were local.

ShunmeiCho · 4 months ago

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.

cc-clip setup myserver

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.

Sanjeev2487 · 4 months ago

Still seeing this issue happening over a ssh'd terminal.
i ssh from my local windows to remote linux machine.

kasai2210 · 3 months ago

@ShunmeiCho this is an amazing tool, thanks for creating it!

hqhq1025 · 3 months ago

clipaste now supports SSH remote paste (v2.1.0).

It runs an HTTP server locally that serves your latest screenshot. One-time setup:

# Install locally
brew install hqhq1025/clipaste/clipaste
brew services start clipaste

# Configure remote server
clipaste ssh-setup user@your-server

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.

artnikbrothers · 2 months ago

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

samuellawrentz · 2 months ago
8-unlimit · 1 month ago

I really would love to have this feature

MisterD7793 · 28 days ago

I have this same issue:

Clipboard Paste Issue (Claude Code over SSH)

Setup

  • Local machine: connecting via Prompt (Panic) over Tailscale SSH, also reproduced via iTerm2
  • Remote (DevMac): Claude Code running directly (no tmux)

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

  • tmux config has allow-passthrough on — tmux is not obviously the culprit
  • Claude Code fully intercepts Ctrl+V and runs its image-paste routine, which tries to read the clipboard on the remote machine (DevMac), not from the SSH client
  • Cmd+V bypasses Claude Code's interception entirely — Prompt injects it as raw stdin
  • Prompt has an "Allow clipboard writing" setting (was off, turned on) — this is the wrong direction; it lets the remote write to the local clipboard, not vice versa
  • Likely a Claude Code regression — Ctrl+V used to pass through to the terminal

Confirmed (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

  • Use Cmd+V for text (works — Prompt injects as raw stdin)
  • Images: no working workaround yet — Cmd+V does not forward image data as raw input