You connect from Windows to your Linux server over SSH, run
claude, copy some text in Notepad and press Ctrl+V. Instead of the text you get:Code: Select all
No image found in clipboard. You're SSH'd; try scp?The cause
Two settings on the server (in~/.claude/ of the user who runs Claude Code):- In
keybindings.jsonthectrl+vkey is bound tochat:imagePaste. Claude Code "catches" Ctrl+V and looks for an image in the clipboard. Over SSH it cannot see your Windows clipboard, so it says there is no image. - In
settings.jsonthere is"tui": "fullscreen". In this full-screen mode, pasting text over SSH does not go through correctly, even with the other keys. It is part of the cause, not an unrelated setting.
The fix, step by step
On the Linux server, as the user you run Claude Code with:1) Check the version and which files exist:
Code: Select all
claude --version
ls -la ~/.claude/keybindings.json ~/.claude/settings.jsonCode: Select all
grep -n '"ctrl+v"' ~/.claude/keybindings.json
grep -n '"tui"' ~/.claude/settings.jsonCode: Select all
cp ~/.claude/keybindings.json ~/.claude/keybindings.json.before-ctrlv-fix
cp ~/.claude/settings.json ~/.claude/settings.json.before-tui-fixCode: Select all
perl -0pi -e 's/"ctrl\+v": "chat:imagePaste"/"ctrl+v": null/' ~/.claude/keybindings.jsonnull means "Claude Code does nothing with this key", so it reaches the terminal.5) Remove the full-screen mode: open
~/.claude/settings.json and delete the "tui": "fullscreen" line. If that was the only thing in the file, it should end up as:Code: Select all
{}6) Check that the JSON files are valid:
Code: Select all
python3 -m json.tool ~/.claude/keybindings.json > /dev/null && echo OK
python3 -m json.tool ~/.claude/settings.json > /dev/null && echo OKCode: Select all
claude doctorHow to paste text afterwards
The image message is gone. To actually paste text over SSH, use the terminal's keys, not Claude Code's:- Ctrl+Shift+V (Windows Terminal)
- Shift+Insert
- right-click (PuTTY and most terminals)
If something goes wrong
Restore the backups:Code: Select all
cp ~/.claude/keybindings.json.before-ctrlv-fix ~/.claude/keybindings.json
cp ~/.claude/settings.json.before-tui-fix ~/.claude/settings.jsonReady-made script
The same steps as one script: it makes backups, validates the JSON, restores the backup by itself if something breaks, and has--dry-run and --undo. The code is on GitHub: vps-scripts → claude-code.Code: Select all
curl -fsSL https://raw.githubusercontent.com/rychy-vpsstorages/vps-scripts/main/claude-code/fix-ctrlv-ssh.sh -o fix-ctrlv-ssh.sh
less fix-ctrlv-ssh.sh # read it first
bash fix-ctrlv-ssh.sh --dry-run # only shows what it would change
bash fix-ctrlv-ssh.shHow to install Claude Code on a VPS: Claude Code on your own VPS: installation in 5 minutes. If your message is different or the fix does not help, post in this topic with your version (
claude --version) and the terminal you use.