I was following some guide to create key-pair for my remote linux system, one of the steps being copy the public key generated and saved on my local computer to the authorized-keys file on remote computer. I tried ctrl + c and then ctrl + v to nano/vi editor in the "putty" window, but it doesn't work(nothing appears in the editor). Do I really have to manually type in the keys or there is some other way to copy and paste it?


You can of course use the mouse, but that runs the risk of accidentally selecting/pasting due to mouse-movement.

PuTTY recognizes ShiftInsert for pasting from the clipboard. This works reliably (key bounce is rare). You can also change the behavior of the right-click to get a menu, as noted in Greg Ferro's page.

Further reading:


If you've got content from another application copied into the clipboard on your local machine, right-click anywhere within the PuTTY window to paste it into the remote shell.

Note: instead of pasting the key into a text editor, you can use echo and redirect its output to authorized-keys, like so: echo [paste your public key here] >> ~/.ssh/authorized_keys. In the past, I've had issues pasting into nano/vim with PuTTY (though they may have fixed that behavior).


Try shift-right clicking instead.

I, too, found that right-click alone would not work (in nano)--even though right-clicking at the terminal WOULD paste the clipboard. And I found all kinds of suggestions of things to try (ctrl-shift-v, shift-insert), none of which would work. Finally, I found someone suggesting shift-right click, and it worked without any needed mods. Salvation when one has to insert long or multiple lines from outside the editor!

That said, I found some multi-line text would paste while some would not. In that case, if I pasted it a couple of lines at a time, it worked. Odd. Sharing that in case it may help someone else, or they may know what was up.


you can login FTP wit Winscp(in Windows) or Filzilla (in Linux) and go to file .ssh/authorized_keys end open it and copy . is better and these Software are helpful and fast to change files


In all place, nano editor works the same!

Lines can be cut with the shortcut Ctrl+K (copied with Alt + ^) and paste with Ctrl+U.

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.