ZAGO.TO All tools →

Blog

SSH copy paste: why Ctrl+V does nothing in the terminal

2026-10-11

This post contains affiliate links. As an Amazon Associate, ZAGO.TO earns from qualifying purchases.

You copied a long command from the docs, clicked into your SSH session, pressed Ctrl+V, and the cursor just sat there. Maybe a strange ^V appeared.

Nothing is broken. SSH copy paste depends on the terminal window on your own computer, not on the server, and each terminal picked different keys.

This guide covers the keys for each common terminal, the habits that keep a paste from running the wrong thing, and how to get text back from the server onto your own clipboard.

Contents

  1. Why Ctrl+V does nothing
  2. The keys, terminal by terminal
  3. When the mouse stops selecting: tmux, vim and screen
  4. Pasting multi-line commands safely
  5. Copying from the server to your own clipboard
  6. Copying files instead of text
  7. When the command lives on another device

1. Why Ctrl+V does nothing

A developer at a desk looking at a terminal window on a laptop

▲ The shortcut belongs to the window, not to the server

In a terminal, Ctrl and a letter are usually sent to the remote shell as a control character.

To bash, Ctrl+V means "insert the next key literally", so nothing visible happens until you press another key.

Ctrl+C is worse. It does not copy, it stops whatever is running. If you press it out of habit during a long job, the job ends.

Two more control keys catch people out in the same way:

So the terminal app moves copy and paste to other keys or to the mouse. Once you know which window you are in, the fix takes a second.

2. The keys, terminal by terminal

Copy and paste keys in common SSH terminals

▲ Find your window in the left column

| Terminal | Copy | Paste | |---|---|---| | PuTTY | Select with the mouse (copies at once) | Right-click, or Shift+Insert | | Windows Terminal, PowerShell | Ctrl+Shift+C, or select then Enter | Ctrl+Shift+V, Ctrl+V, or right-click | | Git Bash (mintty) | Select with the mouse, or Ctrl+Insert | Shift+Insert | | VS Code terminal on Windows | Ctrl+C when text is selected | Ctrl+V | | macOS Terminal, iTerm2 | Cmd+C | Cmd+V | | Most Linux terminals | Ctrl+Shift+C | Ctrl+Shift+V, or middle-click |

A few notes on that table.

PuTTY has no visible copy step. Dragging over text copies it immediately, which surprises people who then right-click to "open a menu" and paste instead.

If a right-click pasted something you did not expect, that is why.

VS Code is the odd one. On Windows its terminal treats Ctrl+C as copy only while text is selected. With nothing selected, Ctrl+C goes to the server and stops the running command.

macOS avoids the whole problem, because Cmd is never sent to the server. Ctrl keeps its terminal meaning and Cmd does the clipboard.

On Linux, selecting text and middle-clicking uses a separate selection buffer, not the normal clipboard.

That is why text you highlighted can paste with a middle-click even when Ctrl+Shift+V pastes something older.

3. When the mouse stops selecting: tmux, vim and screen

If the session runs inside tmux or vim with mouse mode on, the mouse selection is caught by them, not by your terminal window. Dragging highlights text, but nothing reaches your clipboard.

Hold Shift while you drag to let your terminal select instead. On iTerm2 the key is Option, not Shift.

This works because the terminal app checks for the modifier first and keeps the drag for itself. tmux and vim never see it.

The catch is that a Shift-drag selects what is drawn on the screen. With two tmux panes side by side, it grabs both panes' lines together.

For a clean copy of one pane, zoom it first with the tmux prefix and z, then select.

4. Pasting multi-line commands safely

Before pasting a multi-line command, read it once. A newline at the end runs it immediately.

How immediately depends on your shell.

Some terminals add a second guard. Windows Terminal shows a warning before pasting text with more than one line, and lets you cancel. That prompt is worth leaving on.

Three habits cover the rest:

5. Copying from the server to your own clipboard

Text you see in the session can be copied the same way, by selecting it in your terminal window. You are copying what is on your screen, so nothing special happens on the server.

What does not work is a copy command typed on the server, like pbcopy or xclip. Those put text on the server's own clipboard, which you cannot reach from your desk.

For long output, selecting by hand stops being practical. Two better routes:

OSC 52 works in iTerm2, Windows Terminal, kitty and WezTerm, and tmux passes it through when `set-clipboard` is on.

It is off or restricted in many setups, because any program on the server could then write to your clipboard.

If neither is set up, `less out.txt` and selecting one screen at a time still works.

6. Copying files instead of text

Many people searching for SSH copy paste actually want a file. Selecting text is the wrong tool for that. Use the copy command that comes with SSH.

``` scp user@server:/home/user/out.txt . scp report.pdf user@server:/home/user/ ```

The first line copies a file from the server into the folder you are in. The second copies a local file up to the server. Swap in your own user, server and paths.

On Windows 10 and 11, `scp` is included with the built-in OpenSSH client, so it runs in PowerShell. Graphical tools such as WinSCP or FileZilla do the same with drag and drop.

7. When the command lives on another device

Sometimes the long command is on your phone, in a chat or a note, and the terminal is on a laptop you cannot sign in to anything on.

For a plain command, ZAGO.TO carries it: paste on the phone, get a 4-digit code, type the code in a browser on the laptop and copy the text from there.

ZAGO.TO deletes the text after 1 minute if no one opens it, or 1 minute after it is opened. It carries text only, not files, and the text cannot be opened again once it is gone.

It has no in-browser encryption yet, so our server can read the text. Never send SSH keys, passwords or tokens that way, or through any text site.

Longer snippets between your own machines are covered in Paste code online to move a snippet between your own machines.

8. In one line

Find your terminal in the table above, use its keys instead of Ctrl+V, keep Ctrl+C for stopping things, and use scp when what you really need to move is a file.

Free tools on ZAGO.TO

Age CalculatorExact age, two datesDays until ChristmasLive countdownWord CounterWords, charactersWheel SpinnerPick names, lunch
See all tools →