I would like to copy from a local machine and paste into vim on a remote box which I am SSH'd into.

That's it.

I have tried "+p and "*p, mouse middle-clicking, and a couple other things to no avail :(

Also acceptable (though less convenient) is to just skip vim and pipe clipboard into file.

My problem was that I am using PuttyTray and not Putty, when I tried to do the same thing in Putty it worked -- I didn't think there would be a problem with that.

  • Are you in insert mode for vi? Using putty? Try shift+insert. – jordanm Jan 24 '14 at 0:24
  • shift+insert and then what? yes, putty – frickskit Jan 24 '14 at 0:26
  • 1
    Putty should have the standard clipboard facilities (copy, paste, cut...) somewhere in the window menu - have you tried that? Remember to have vi in insert mode when you do that as jordanm suggested. It is also usually a good idea to :set paste when pasting anything into vim. Also check PuTTY's selection options: configuration -> Window -> Selection (see e.g. codeweblog.com/upload/c/h/…) – peterph Jan 24 '14 at 2:44

On my windows laptop, pasting into remote vim, this is the only thing I could get to work:

Ctrl+C was fine for copying.. but I needed Shift+Insert to Paste !

(A good reason to always get a laptop where Insert can always be accessed without pressing a secondary key)


Enter insert mode in vim (i) and you can right click on the putty window to bring up a menu that has a paste command. Also an option in the menu bar. Works for me from windows.

Putty doesn't copy the the contents of the windows clipboard to the remote computer's clipboard. It basically virtually enters them as if you were typing the characters in the clipboard.

  • when I ctrl+right click the paste button is grayed out! (and just right click doesn't do anything). – frickskit Jan 24 '14 at 13:19
  • @frickskit are you sure the text you want to paste is in the clipboard? Try pasting it in notepad to be sure. This always worked for me. – OrganicLawnDIY Jan 24 '14 at 14:45
  • My problem is that I am using PuttyTray and not Putty, when I tried to do the same thing in Putty it worked -- I didn't think there would be a problem with that. – frickskit Jan 24 '14 at 15:39
  • @frickskit ah... You said putty earlier... I'm not familiar with PuttyTray – OrganicLawnDIY Jan 24 '14 at 17:45
  • yeah, my bad -- didn't think they would be different. – frickskit Jan 25 '14 at 21:30

If you are using windows 10 ssh on the command line all you need to do is right-click the mouse.


These days, I am using WSL (Ubuntu 18 TLS) in a Windows 10 machine instead of PuTTY for SSH and I use Vim.

I had troubles copying code from Windows 10 to paste in the remote server. Ctrl+Shift+V did not work or any other method.

My solution is: copy text from a window, then move to the Ubuntu terminal, then change Vim to insert mode (insert) then use the right click of the mouse.


I see that this post has already been answered, but as a further option; I use PuTTy and my local machine is Windows 10.

If I copy some text from my local machine, all I need to do is to right mouse click into the PuTTy terminal window, and this will paste my clipboard there.

It doesn't matter if you are using vim, vi or nano, etc. it will still work, as this is a PuTTy terminal.

  • 1
    Right-click has already been mentioned – Jeff Schaller Nov 5 at 13:06
  • Thanks @JeffSchaller, I know, hence why I said in the beginning of my post. I mentioned it because it wasn't explicitly made clear to anyone in detail :) – Kevdog777 Nov 5 at 14:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.