PuTTY: How to copy and paste to and from a PuTTY window
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
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
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
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
Plume January 21, 2014 at 1:51 am
Thank you for the tutorial. It works for me only in Windows. Is it possible to use it the same way in Linux?
James Davey January 21, 2014 at 8:38 am
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.
Plume January 21, 2014 at 1:14 pm
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.
Tim Thomas June 13, 2015 at 3:32 pm
Just right click at the cursor position. Thats it.
Ajith May 5, 2014 at 3:43 am
I need it for Ubuntu
James Davey May 5, 2014 at 7:34 am
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.
Vinay Gupta July 28, 2014 at 7:06 pm
Thank you very much it helped a lot to me
Marcos January 6, 2015 at 10:30 am
Those instructions does NOT work for Linux distributions.
Some people like to use Putty in Linux or Unix boxes even with ssh built in.
James Davey January 6, 2015 at 11:26 am
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.
Greg Pummill January 12, 2015 at 11:51 am
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?
Mark McQuaid January 12, 2015 at 1:15 pm
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.
sunny February 4, 2015 at 1:47 pm
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
James Davey February 4, 2015 at 1:50 pm
Hi Sunny,
Sorry to hear of the troubles. It sounds like a website is giving you this error? Which website?
sunny February 4, 2015 at 2:40 pm
http://autogarage4u.com/login.jsp
James Davey February 5, 2015 at 5:35 am
Hi Sunny,
That is not a site we control, and you would need to contact the site owner about that.
Sridhar June 4, 2015 at 1:20 am
Can we automate download of files in cluster using putty
James Davey June 4, 2015 at 5:09 am
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.
Sridhar June 30, 2015 at 12:22 am
Thank you James
AngryLinuxUser June 26, 2015 at 9:23 am
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.
James Davey June 26, 2015 at 9:31 am
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.
Vin July 6, 2015 at 4:43 pm
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!
James Davey July 7, 2015 at 5:38 am
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.
Another linux user here July 17, 2015 at 4:24 pm
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.
NASEEM KHAN July 31, 2015 at 10:53 am
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!!!
Hardik Kansara August 11, 2015 at 1:15 am
Awesome!! Thanks for nice and simple tutorial.
Gazotti September 25, 2015 at 7:40 pm
Thanks! Helped me a lot!
Sourabh Shah November 17, 2015 at 1:11 am
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.
CapnChkn November 22, 2015 at 1:05 am
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…
Weiliang Zhu December 26, 2015 at 11:08 am
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.
Corey Mahon December 28, 2015 at 8:06 am
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!
UgoChukwu January 8, 2016 at 1:58 pm
Thanks for the tutorial. It worked exactly as you said.
Ronnie Guthrie April 13, 2016 at 5:58 pm
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.
Dries Knottnerus August 18, 2016 at 2:56 am
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.