How to paste an image or screenshot into Claude Code over SSH
Over SSH, Claude Code's image paste reads the clipboard of the machine Claude runs on, not your laptop's, so a screenshot taken on the laptop never arrives. Copy the file over with scp and give Claude its path. With hivemux connect, Ctrl+V in a remote Claude pane copies the image on your Mac's clipboard across and it shows up as [Image
You are on a laptop, attached over ssh to a Mac where Claude Code is doing the work. You take a screenshot of a broken layout, press Ctrl+V in Claude’s prompt, and nothing shows up, or an old image from the other Mac does. The image is fine; it is just on the wrong computer.
Why the paste does not arrive
Claude Code’s docs list three ways to get an image into a session (Work with images):
- Drag and drop an image into the Claude Code window.
- Copy an image and paste it with
Ctrl+V(Alt+Von Windows and WSL). - Give Claude an image path, for example “Analyze this image: /path/to/your/image.png”.
The keyboard shortcut table adds that Cmd+V also works in iTerm2, and that a pasted image becomes an [Image #N] chip in the prompt.
All three assume Claude and the image are on the same computer. Over ssh they are not:
- Ctrl+V asks for the clipboard of the Mac where
clauderuns. Your screenshot is on the laptop’s clipboard, and ssh does not carry clipboards. - Drag and drop types the file’s path on the laptop. The remote Mac has no such file.
- A path works, but only once the file is on the remote Mac.
So the reliable generic fix is the third method: move the file, then name it.
| Setup | Ctrl+V | Drag and drop | scp, then path |
|---|---|---|---|
| Claude Code running on this Mac | Works | Works | Not needed |
Plain ssh or mosh to another Mac |
Reads the other Mac’s clipboard | Path does not exist there | Works |
hivemux connect (ssh or mosh), 0.1.26+ on both Macs |
Works | Path does not exist there | Works |
Step 1. Save the screenshot as a file
The macOS screenshot shortcuts Cmd+Shift+4 (area) and Cmd+Shift+3 (whole screen) save a PNG to the Desktop by default. If you copied an image to the clipboard instead, paste it into Preview with File → New from Clipboard and save it.
Step 2. Copy it to the Mac running Claude
From the laptop, send the newest screenshot under a short name so you do not have to type the spaces macOS puts in screenshot file names:
scp "$(ls -t ~/Desktop/Screenshot*.png | head -1)" me@work-mac.local:/tmp/shot.pngReplace me@work-mac.local with whatever you pass to ssh. /tmp is fine for a throwaway image; use a folder inside the project if you want to keep it.
Step 3. Give Claude the path
In the remote Claude Code session, refer to the file in your prompt:
Look at /tmp/shot.png: the pay button sticks out of the card on mobile.Claude reads the image from disk the same way it would read one you pasted. This works with every terminal and every connection method, which is why it is worth knowing even if you use something else day to day.
With hivemux: Ctrl+V across Macs
The scp route costs a context switch for every screenshot. hivemux takes that step out.
hivemux is a tmux sidebar that shows every Claude Code session — running, waiting for you, or done — and lets you jump to the one that needs you. Its hivemux connect command attaches to another computer’s hivemux (a Mac or Linux) over ssh (or mosh) in its own window, with the same sidebar and sessions.
In that window, Ctrl+V in a Claude pane does what you expected in the first place: hivemux takes the image on the clipboard of the Mac you are sitting at, copies it to the other Mac, and pastes its path into the pane. Claude Code turns the path into [Image #1], as it does with an image pasted locally.
![A hivemux connect window attached to a Mac Studio: a screenshot on the MacBook’s clipboard was pasted with Ctrl+V into a remote Claude Code session and shows as [Image #1] in the prompt](/_astro/paste-poster-en.DtSJxJga_1gNh7n.webp)
Install hivemux on both computers; both need version 0.1.26 or later. Either side can be a Mac or a Linux machine, such as a Linux dev server you reach from your Mac:
curl -fsSL https://hivemux.dev/install.sh | bash# or, on a Mac: brew install hivemux/tap/hivemuxhivemux setupThen connect from the laptop:
hivemux connect --add me@work-mac.local # check and remember the host (--mosh to use mosh)hivemux connect me@work-mac.localA few details from the source:
- Only Claude panes on a remote screen are affected.
Ctrl+Veverywhere else, and in local panes, goes through unchanged. - Screenshots are PNG already. On a Mac, images copied from apps that only offer TIFF are converted to PNG first. On a Linux laptop, the image is read as PNG with
wl-paste(Wayland) orxclip(X11). - The image travels over the separate ssh connection hivemux uses for dev server port forwarding, so it also works when you connect with
--mosh. WithHIVEMUX_PORTS=0, that connection is off andCtrl+Vis a plainCtrl+Vagain. - If the other Mac runs an older hivemux, the paste falls back to a plain
Ctrl+Vand the status line asks you to update hivemux there.
The other direction: Claude’s screenshot on your laptop
Sometimes the image starts on the remote Mac: Claude ran a browser test and saved a screenshot there. Without extra tools, copy it back and open it:
scp me@work-mac.local:/tmp/checkout.png ~/Downloads/ && open ~/Downloads/checkout.pngIn a hivemux connect window, run this in the remote pane instead:
hivemux open /tmp/checkout.pngThe file is copied to the Mac you are sitting at and opens in its default app. For a path Claude printed, the Option+O open-path popup does the same with Tab, Enter or Ctrl+F (with VS Code or Cursor as the editor, Enter opens it over Remote-SSH instead), and Ctrl+Y puts the path on the laptop’s clipboard. It also finds files Claude names from its scratchpad, such as scratchpad/brand/sheet.png. Both Macs need hivemux 0.1.29 or later.
Related
Setting up the connection itself, with reconnects, notifications and port forwarding, is covered in Use Claude Code from another computer with hivemux and in How to continue Claude Code from your phone or another computer. To keep the remote sessions alive when you close the window, see How to keep Claude Code running after closing the terminal.
FAQ
Why does Cmd+V not paste images into Claude Code?
Claude Code's documented shortcut for pasting an image from the clipboard is Ctrl+V; Cmd+V is listed only for iTerm2. On macOS, press Ctrl+V even though Cmd+V is the usual paste key. Over plain ssh neither works for a laptop screenshot, because the clipboard Claude reads is on the other machine.
Does the hivemux Ctrl+V paste work with --mosh?
Yes. hivemux connect fetches the image over its own ssh connection, the same one it uses to forward dev server ports, and that connection runs under mosh too. If you turned forwarding off with HIVEMUX_PORTS=0, Ctrl+V falls back to a plain Ctrl+V.
Claude made a screenshot on the remote Mac. How do I see it on my laptop?
Without extra tools, copy it back with scp and open it. With hivemux connect, run hivemux open <file> in the remote pane; the file is copied to the Mac you are sitting at and opens in its default app. Both Macs need hivemux 0.1.29 or later.
Can I drag a screenshot into the remote Claude Code window?
Dropping a file into a terminal types its path on your laptop. The remote Mac has no file at that path, so Claude cannot read it. Copy the file over first and give Claude the remote path.
What happens if there is no image on my clipboard?
hivemux shows "No image on the clipboard of <Mac>" in the status line and pastes nothing. Images copied from apps that only offer TIFF are converted to PNG before they are sent.