Clipboard → SSH, for terminal AI agents

Paste local screenshots into your remote coding agent.

Your agent runs over SSH and only ever sees the remote box's clipboard — so the screenshot on your laptop never shows up. cssh bridges the two: screenshot, then press Ctrl+V in your session.

$ curl -fsSL https://raw.githubusercontent.com/Hackerbone/cssh/main/install.sh | bash

One setup script · a few KB · no runtime deps beyond bash + ssh

Works with Claude Code · Codex · any terminal app that pastes via xclip

Your laptop
Clipboard
the screenshot you just took
Remote box
xclip shim
serves the image to your agent

The gap: your image lives in your laptop's clipboard; your agent, running over SSH, only ever asks the remote's. cssh ships the bytes across a connection that's already warm — no X server, no OSC 52, no copy-paste dance.

How it works

Three steps. The middle one is invisible.

A real sequence, start to finish — capture on your machine, sync over SSH, paste on the remote.

01 — Screenshot

Capture on your laptop

Grab anything the way you always do. It lands in your local clipboard — nothing new to learn.

02 — Sync

Ship it over SSH

A background daemon (or your hotkey) pushes the PNG to ~/.cssh/latest.png on the remote over a multiplexed connection.

03 — Paste

Press Ctrl+V in your agent

A shimmed xclip, ahead of the real one on PATH, serves your image once — then gets out of the way.

No X server· No Xvfb· No OSC 52· one-shot with a TTL, so your next paste is plain text again
Why it's tiny

Small enough to read before you run it.

$_

One clean script

Every component embeds in a single installer. Pipe it to bash — no secondary downloads, no package to trust.

≈KB

A few kilobytes

The whole thing is a handful of bash scripts. Auditable in one sitting; you can read every line.

Near-instant pushes

SSH connection multiplexing keeps a warm socket open, so images land in milliseconds — not a fresh handshake each time.

One-shot by design

Each image is served once, with a TTL guard. Paste an image, then your very next paste is ordinary text.

Zero runtime deps

Your laptop needs only bash + ssh. The remote needs bash, stat, date. That's it.

gum, or not

Pretty menus with gum when it's installed, a clean built-in numbered menu when it isn't. Your call.

Platforms

Runs where you already work.

Local — where you screenshot
  • macOS
  • Linux · X11
  • Linux · Wayland
  • Windows · Git Bash

Reads your OS clipboard natively — osascript on macOS, wl-paste / xclip on Linux, PowerShell on Windows.

Remote — where your agent runs
  • Any Linux box you SSH into
  • WSL
  • Cloud dev boxes

The shim hooks the exact xclip calls your agent makes on Linux. Bash, stat, and date are all it needs.

Set it up in one line.

Run it on your laptop. It reads ~/.ssh/config, lets you pick your hosts, and wires up both ends.

$ curl -fsSL https://raw.githubusercontent.com/Hackerbone/cssh/main/install.sh | bash

then screenshot → Ctrl+V inside your agent on the remote

Changed your mind? Uninstall is one line too — it reverses both ends and backs up your SSH config.