How to Copy and Paste in PuTTY
Many PuTTY users complain about not being able to copy and paste shell commands to and from the app’s interface. PuTTY supports both these functions. However, the problem lies in the fact that the copy/paste process itself is different than it is in other apps.
In this article, you will learn how to copy and paste in PuTTY. But before that, let’s take a quick look at the program itself, its history, and main functions.
What Is PuTTY?
PuTTY is a popular client-side program available for Windows and Unix-like systems which is designed for use with the SHH, Rlogin, and Telnet network protocols. These protocols are used to securely run remote sessions between computers over an unsecured network, essentially allowing one computer to control another.
PuTTY was written by, and for the most part is largely still curated by, British programmer Simon Tatham, and is published under the MIT licensing scheme. The program’s first iteration was released to the public in January 1999, and for the last 20 years, it has been one of the go-to utilities for Windows admins looking for open-source software.
How Does It Work?
PuTTY is an interface for the client side of remote sessions. In other words, it only operates on the side of the session where the information is displayed, not on the machine that is actually running the session. It acts as if you are sitting at the computer you are communicating with, and typing directly into its command line console.
It provides a visual interface through which you can issue commands and receive responses to another machine on your network, across different operating systems. There is a port for MacOS in progress, and other unofficial ports exist for platforms like Windows Phone and Symbian, though there is still much work to be done on most of these projects.
While this client-side terminal can be very helpful, it can also lead to some confusion, as your normal Windows keyboard commands will not have the function you expect. Ctrl+C, for example, would not serve the function of copying something to your clipboard. In fact, in many situations, it will end whatever command is currently being processed, which is hardly ideal.
How to Copy Text from Windows to PuTTY
To copy text from Windows to PuTTY, follow these steps:
- Highlight the text in Windows.
- Press Ctrl+C or right-click the highlighted text and then left-click on Copy in the context menu.
- Left-click on the PuTTY window to select it.
- Right-click inside the PuTTY window where you want to paste the text or press Shift + Insert.
How to Copy Text from PuTTY to Windows
To copy text from Putty to your Windows clipboard, here’s what you need to do.
- Left-click inside the PuTTY terminal window near the text you want to copy.
- Holding down the left mouse button, drag your cursor across the text to select it.
- Release the mouse button to automatically copy the text to your clipboard.
- Left-click on the Windows application you want to copy to.
- Press Ctrl+V or right-click, then left-click on Paste in the context menu.
How to Copy Text Within PuTTY
If you want to copy text within PuTTY, here are the steps you need to follow:
- Place the cursor near the text you want to copy and left-click.
- Still holding the left mouse button, drag the cursor across the text you want to copy to highlight it.
- Release the mouse button to copy the text.
- Right-click on the terminal window in the place that you want to paste the text or press Shift + Insert.
If you are using a text editor like Vi or Nano to work on a document, you can also use those programs’ cutting and pasting functionality to achieve the same end.
Setting PuTTY to Copy in Rich Text Format
By default, PuTTY doesn’t copy the formatting information included with Rich Text Format as it can be inconvenient for its users. In order to enable this feature, do the following:
- Open the PuTTY application to access the initial configuration options.
- Click on the + next to Selection under the Window
- Click on Copy.
- Click the checkbox under Formatting of copied characters.
Useful Shortcuts When Copying from PuTTY
To copy a whole word or sequence of words, double-click the left mouse button before dragging the cursor to highlight what to copy.
To copy entire lines or sequences of lines, left-click three times before dragging the cursor.
PuTTY in Your Hands
PuTTY is one of the most popular clients for SHH, Rlogin and Telnet, but it has been fairly criticized for having a pretty complicated interface and rather steep initial learning curve. Using these simple methods, you can save yourself the frustration of accidentally ending a running command on the computer that you are communicating with.
Have these tips helped you successfully copy/paste text in PuTTY? Do you have any other PuTTY-related tips that you think would help other users get the most of this app? Share them with us in the comments below.