Site5 - Built For Designers & Developers MENU
Home  ›  Shell Access (SSH)  ›  PuTTY  ›  PuTTY: How to copy and paste to and from a PuTTY window

PuTTY: How to copy and paste to and from a PuTTY window

33 Comments

It may not be obvious to you, but it is possible to copy and paste to and from a PuTTY window. This tutorial will show you how to do that

Copying and pasting in PuTTY is very easy, but different from the way it’s done in most other programs

1) You’ll need to be logged in to a PuTTY session before you begin

2) All you have to do is left click and drag to make a selection

As soon as you let go of the mouse button, the selection is instantly copied to your clipboard and ready to be pasted

3) Simply click off of the selection to deselect it

4) Now, let’s paste the selection into another window. For this tutorial, we’ll just use a Notepad window that we already have open

5) Right click, then Paste

The selection has been copied and pasted successfully

Now, let’s try copying and pasting an SSH command we’ve stored in a different Notepad window

6) Right-click and Copy

7) Return to PuTTY

8) Simply right-click to paste

9) Press Enter to execute the command

You can also select and copy a rectangular region in PuTTY. For our purpose, this is useful to copy just the filenames in this directory listing

10) Hold down ALT, then click and drag from the top left corner to the bottom right

11) Switch back to Notepad

12) Press CTRL+V to paste

The rectangular region you copied has been pasted successfully

This completes the tutorial. You should now know how to copy and paste to and from PuTTY

Still have a question? Or need help?
If you need technical support with your account, please email us or chat live with a representative.

33 Comments

  • Thank you for the tutorial. It works for me only in Windows. Is it possible to use it the same way in Linux?

    • Hi Plume,

      In Linux, you do not need extra software – ssh is built-in. Open a terminal window in Linux, and simply run your SSH command:

      ssh user@host

      You will be prompted for a password on connection.

      • Thank you! I am very surprised! I didn’t know about builted ssh in terminal.

        I found solution for Pytty copy&paste. If it help anybody – you can use middle botton (or wheel) of mouse (or both together on touchpad) to paste anything into putty’s window.

        • Just right click at the cursor position. Thats it.

  • I need it for Ubuntu

    • Hello Ajith,

      Actually, you don’t :) As Ubuntu is a distribution of Linux, SSH is built-in, and used in the Terminal just like any other Linux installation. Simply run this as your SSH command:

      ssh user@host

      Where ‘user’ is your username, and ‘host’ is your domain name.

  • Thank you very much it helped a lot to me

  • Those instructions does NOT work for Linux distributions.
    Some people like to use Putty in Linux or Unix boxes even with ssh built in.

    • Hello Marcos,

      This is true, yes. But the fact remains that the vast majority of PuTTY users are Windows-based, and this article is targeted at them. There are articles on using PuTTY in Linux, but none specifically for that here – an example is http://www.linuxtechi.com/install-putty-in-ubuntu/, but Google can point you in the right direction for more detailed information.

  • I am trying to execute a upush command in linux. When I copy the command from notepad, I get a message that part of the command is invalid. If I manually enter that same exact command, it executes just fine. Is there some kind of control character that I am not able to see?

    • Hi Greg,

      Sorry to hear of the troubles. If you wish to paste the command here, we will be happy to go over it with you.

  • I can’t copy paste on site as its show right click not allowed nd ctrl copy paste also don’t work on that site

    • Hi Sunny,

      Sorry to hear of the troubles. It sounds like a website is giving you this error? Which website?

  • Can we automate download of files in cluster using putty

    • Hello Sridhar,

      This wouldn’t be done by putty, really. You could certainly write a bash script to do this for you, though. You would use putty to connect and create the script, and kick it off, but the script would be doing the work.

      • Thank you James

  • This is complete waste of my time. Putty is mainly used on Linux and other Linux-like systems. Please put “for Windows users” in the name of this article because you confuse people and rightly they get angry on you as I am now. Why? I shouldn’t be here and wasting my time reading this useless text.

    • I’m very sorry you feel that way. In our experience, PuTTY is generally used by Windows users, as Linux has a native tool which functions in much the same way – indeed, often better. The terminal window in Linux has all of the tools PuTTY allows built-in, while Windows does not.

  • I have to agree with AngryLinuxUser. I use PuTTY on Linux and cannot get copy & paste to work. None of these suggestions were helpful for Linux. If anyone knows how to get copy & paste to work within PuTTY on Linux, I’d be be grateful if you shared here. Thanks in advance!

    • Hello Vin,

      These same steps should allow you to copy and paste to/from PuTTY in Linux. Note that highlighting the text in the PuTTY window copies to your clipboard, and you need to use CTRL+V to paste.

  • Paste with shift+ins or shift+insert
    see:
    http://superuser.com/questions/180043/how-do-i-paste-the-windows-clipboard-into-my-putty-session-using-only-the-keybo

    As for copy, I would use logging.

  • Thanks very much for the tutorial ,I am a new Hortonworks VM sandbox user newbie for PUTTY, this simple but less documented tip made my life much easier!! Thanks again!!!

  • Awesome!! Thanks for nice and simple tutorial.

  • Thanks! Helped me a lot!

  • Yes Copy and Paste works in Putty on Linux as well.
    Steps are as follows :
    1)Select the text from putty window.
    2)Use Mouse wheel click same thing will be copied on Putty window as well,which can be ignored.
    3)Open any editor and Paste it.

  • I’ve tried all the different methods of cutting and pasting documented here, and the only thing that has worked is to open the SSH in Terminal and use it!

    I used to copy, paste by right clicking, but in the upgrade I seem to not have any of that functionality…

  • I found these work very nice in putty, thanks a lot. But a problem occurred when I paste from windows to putty that runs vim.

    now I try to paste it in bash in one window os ‘screen session’,than paste it
    to vim, but I want to konw that whether you have better ideal.

    • Hi Weiliang!

      I’m glad to hear that these instructions have helped nicely, you’re very welcome! Regarding your copy/paste issue, I’m not sure I fully understand what the problem you are seeing is. If you could please open a support ticket through your Backstage panel, we’ll be glad to take a deeper look into the issue you are seeing and help find the best method to use!

  • Thanks for the tutorial. It worked exactly as you said.

  • For linux (*buntu flavours), try installing parcellite or diodon…

    sudo apt-get install parcellite
    or
    sudo apt-get install diodon

    Launch the app and select preferences, ensure the ‘sync clipboards’ option is checked. This keeps respective xterm/gnome/xfce clipboards consistent.

  • I noticed that right-clicking often pastes two times, if you press it just a bit too long. This
    is annoying, because in the password field you don’t see what it is doing. I really had to practice a bit to make a very short, crisp right-click.

    If you are working on a laptop, you can also use the right-click button there, that might work better.

Money Back Guarantees