How to paste images into Claude Code over SSH
Over a normal SSH connection, Ctrl+V with a screenshot does nothing in Claude Code, because Claude Code reads the clipboard of the machine it runs on, and the screenshot is on yours. The reliable fix is to copy the image file to the server and type its path into your prompt. Other options are a terminal that uploads dragged images for you, attaching the image through Claude's Remote Control, or a setup like Zydra that carries the clipboard image from your computer to the remote session.
Why doesn't Ctrl+V paste images over SSH?
Text paste works because your terminal does it: it takes the text from your computer's clipboard and types it into the SSH session. An image can't be typed. So Claude Code handles image paste itself. When you press Ctrl+V, it asks the operating system it runs on for an image in the clipboard. On Linux it does this by running xclip or wl-paste.
On a server those commands either aren't installed or have no display to talk to. Even when they run, the clipboard they see belongs to the server, not to your laptop. The image never leaves your computer, so Claude gets nothing.
Fix 1: copy the file and give Claude the path
Claude Code reads images from paths in your prompt. Anthropic's docs list it as one of three ways to give Claude an image, next to drag and drop and Ctrl+V. Save the screenshot to a file, copy it up and mention it:
scp ~/Desktop/shot.png server:/tmp/shot.pngThen in Claude Code:
Look at /tmp/shot.png and fix the overlapping buttons.This always works. It is just three steps instead of one. A small shell function on your laptop makes it one command:
shot() { scp "$1" server:/tmp/ && echo "/tmp/$(basename "$1")"; }shot ~/Desktop/shot.png uploads the file and prints the remote path to paste into your prompt.
Fix 2: drag and drop that uploads
Dragging a file onto most terminals types the file's local path, which doesn't exist on the server. Some tools handle that case. cmux, a free macOS terminal built on Ghostty for coding agents, has a cmux ssh command, and dragging an image into that remote session uploads it with scp.
Fix 3: attach the image from the Claude app
If you run Claude Code with Remote Control (claude --remote-control, or /remote-control inside a session), you can attach a photo or file from the Claude app or claude.ai/code. Claude sees attached photos directly. This needs a Pro, Max, Ultra, Team or Enterprise plan and a claude.ai login, not an API key. It is handy when the picture is already on your phone.
Fix 4: X11 forwarding
Claude Code on Linux tries xclip first. If your own computer runs an X server and you connect with ssh -X, xclip on the server can read your local clipboard through the forwarded display. It is slow over long links, and the OpenSSH manual warns that X11 forwarding should be enabled with caution, because the server gets access to your display. Many people leave it off.
What about tmux and OSC 52?
OSC 52 is the escape sequence that lets programs in a terminal copy to your local clipboard, and tmux supports it with set -g set-clipboard on. It carries plain text only. Kitty's documentation says so and adds its own protocol, OSC 5522, which can carry images and other data types. So OSC 52 helps copying text out of a remote session, but not pasting a screenshot in.
How Zydra handles image paste
In Zydra, Claude Code runs in a terminal inside your own VM, and Ctrl+V works the way it does on a laptop. Each terminal in the VM gets a small clipboard server. When Claude Code runs wl-paste to look for an image, Zydra asks your terminal for the clipboard over Kitty's OSC 5522 protocol, and the image comes back from your computer. Claude Code shows it as [Image #1] in the prompt.
A few details:
- Your terminal decides. Every read goes through your terminal, so its permission rules apply. Kitty asks before a program reads your clipboard, and you can allow it once, allow it for the session, or deny it.
- It needs OSC 5522. We tested image paste with Kitty and
kitten ssh. Kitty is also the terminal Zydra recommends overall. In other terminals, the terminal's own paste still types text into the VM, but an image needs OSC 5522. - The demo has it. A free demo gets the same clipboard, so you can try a screenshot paste before paying.
- Copying out works too. Select text in a Zydra terminal with the mouse and it is copied to your computer's clipboard. Ctrl+Shift+C also works.
The same clipboard path works for other programs in the VM that use wl-paste and wl-copy, not only Claude Code.
Which option should I pick?
If you run your own server and paste images now and then, the scp path is free and never breaks. If you use a Mac and want drag and drop, try cmux. If the image is on your phone, Remote Control's attachments are the shortest route. If you want Ctrl+V to work like it does locally, along with notifications and a phone view, try Zydra.
Try it
Run ssh zydra.sh in Kitty. The demo is free for 15 minutes and needs no sign-up. Copy a screenshot, start claude, and press Ctrl+V.
Related: Running Claude Code on a remote server and Using Claude Code from your phone. Or browse all articles.