Feature request: SSH image paste support #10517
Replies: 3 comments 2 replies
-
|
Thanks, I think @rockorager had an idea in mind for a terminal sequence extension to paste non-textual data over SSH as an extension to OSCs to read the clipboard to support trying to read alternate formats. I think your idea of sniffing around SSH and auto-uploading is interesting. I'm not sure that should be a default on kind of thing, it feels a bit scary to me but I have to honestly sit down and really think through the threat model there and what issues really come up. In your PR, the major issue is that you fully implemented it in the macOS app, when we should probably implement this in the cross-platform Zig core (the clipboard ops have to be apprt-specific but I think we already expose multipart to the core, if not thats a much lower surface area lift). |
Beta Was this translation helpful? Give feedback.
-
|
Related: I built cc-clip as a terminal-agnostic solution for pasting images into remote Claude Code sessions over SSH. Instead of relying on terminal-specific clipboard protocols (OSC 52, etc.), it uses an SSH |
Beta Was this translation helpful? Give feedback.
-
|
For anyone running Claude Code over SSH and hitting the image paste issue — I built cc-clip as a terminal-agnostic solution. It works with Ghostty, iTerm2, Terminal.app, or any other terminal. It uses a local HTTP daemon + SSH RemoteForward + xclip shim approach, so it doesn't depend on any terminal-specific clipboard protocol. MIT licensed. Feedback welcome. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
When using Ghostty over SSH, there's no way to paste images from the local clipboard to remote tools that need file paths (like Claude Code, vim with image plugins, etc.).
Currently you have to:
scpit to the remote hostThis breaks the flow, especially when iterating quickly with AI coding assistants.
Proposed Solution
When pasting (Ctrl+V) with an image in the clipboard while in an SSH session:
/tmp/ghostty-paste-{uuid}.pngThis uses existing ControlMaster sockets so there's no password prompt.
Use Case
I frequently use Claude Code over SSH and need to share screenshots/diagrams. This would make image sharing seamless.
Implementation
I have a working implementation ready if this is accepted: #10515
Config options:
ssh-image-paste = true/false(default: true)ssh-image-paste-path = /tmp(configurable)Beta Was this translation helpful? Give feedback.
All reactions