Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Image Paste for Remote SSH (macOS)New to Visual Studio Code? Get it now.
Image Paste for Remote SSH (macOS)

Image Paste for Remote SSH (macOS)

asfeng

|
1 install
| (0) | Free
Paste clipboard screenshots into remote terminals over SSH. Saves to /tmp/screenshots/ and pastes the file path. Great for Claude Code.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Image Paste for Remote SSH (macOS)

Install locally, not on the remote server. This extension runs on your local machine to access the clipboard. VS Code should install it on the local (UI) side automatically, but if prompted, choose "Install Locally".

Requires macOS as local machine. This extension uses macOS-native AppleScript to read the clipboard. It does not work on Windows or Linux local machines.

Compatible with Claude Code, which accepts image file paths as input.

Paste clipboard screenshots into any VSCode terminal — locally or over Remote SSH. The image is saved to /tmp/screenshots/ and the file path is pasted into the terminal.

How It Works

  1. You press Alt+I with a terminal focused
  2. The extension reads the clipboard image from your Mac using native osascript
  3. The image is saved as a PNG to /tmp/screenshots/ on the remote server (or locally)
  4. The file path is pasted into the active terminal (without pressing Enter)
[macOS Clipboard] → [osascript] → [vscode.workspace.fs] → [/tmp/screenshots/screenshot-<timestamp>.png]
                                                           ↓
                                                    [path pasted into terminal]

Usage

  1. Copy a screenshot to your clipboard (Cmd+Shift+4, or any screenshot tool)
  2. Focus on a terminal in VSCode
  3. Press Alt+I
  4. The file path (e.g. /tmp/screenshots/screenshot-1710000000000.png) appears in your terminal

With Claude Code

When using Claude Code in the terminal, the pasted file path is recognized as an image input — Claude will read and understand the screenshot.

With any terminal

In a regular terminal session, the pasted path can be used with any command:

# View the image
open /tmp/screenshots/screenshot-1710000000000.png

# Copy it somewhere
cp /tmp/screenshots/screenshot-1710000000000.png ./my-image.png

Storage

Screenshots are saved to /tmp/screenshots/ on the target machine:

  • Remote SSH: saved on the remote server
  • Local: saved on your Mac

Files are named screenshot-<timestamp>.png. The directory is created automatically. Files in /tmp/ are typically cleared on reboot.

Settings

Setting Default Description
claude-image-paste.screenshotDirectory /tmp/screenshots Directory to save screenshots on the target machine
claude-image-paste.filenamePrefix screenshot Prefix for filenames. Files are named <prefix>-<timestamp>.png

Configure in VS Code Settings (Cmd+,) or settings.json:

{
  "claude-image-paste.screenshotDirectory": "/home/user/images",
  "claude-image-paste.filenamePrefix": "clip"
}

Requirements

Requirement Details
Local machine macOS (required — uses AppleScript)
VSCode 1.85.0 or later
Remote server Any OS via Remote SSH (Linux, macOS, etc.)

Limitations

  • macOS only — will not work on Windows or Linux local machines
  • PNG images only — reads clipboard as PNG format (macOS screenshots are PNG by default)
  • Keybinding override — Alt+I may conflict with other keybindings. Rebind via Keyboard Shortcuts if needed (Cmd+K Cmd+S, search claude-image-paste.paste)
  • Requires an active terminal — won't activate without a focused terminal

Troubleshooting

"No image found in clipboard"

  • Make sure you've copied an image, not a file or text. Use Cmd+Shift+4 to capture a region.

File appears on Mac instead of remote server

  • Open the Output panel (Cmd+Shift+U → select "Claude Image Paste") to see which mode was detected.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft