Putty – Fixing Right Click Paste

The Problem

When using PuTTY to copy and paste text, especially router configurations, it’a far too easy to make a ‘mis-click’ and paste the copied data into the configuration of a router. By default, any text selected in PuTTY is automatically copied to a buffer, ready for pasting. A simple right click can paste to the existing CLI and cause massive configuration errors.

I would think that everyone has done this at least once in their life, and it is a major risk and objection to using putty as a corporate tool.

The Data

There is an option in the PuTTY configuration modify the behaviour of the right click operation. Open the session window and select Window, Selection


By default the Right Button is configured to paste.

The Fix


Change the “Action of Mouse Buttons” to Right CLick brings up the menu.

The Test


Lets select some text.


Right Click †with the mouse now gives a menu of options. The effectively prevents the accidental paste that is so common.

Some Caveats

  • If you have existing session defined in PuTTY then you must select each one of those session and edit it for this action.
  • You should set the Global Default for all new sessions so that you only have to do this fix for your existing settings.
  • If you don’t understand how to create and manage sessions in PuTTY, then look at other posts in the “Working with Putty” series, listed below.

Other Posts in A Series On The Same Topic

  1. Putty - Fixing Right Click Paste (9th January 2011)
  2. Putty, the Command Line and NO clicky clicky (5th October 2009)
  3. Putty - Recommended Default Settings for a Network Engineer (21st September 2009)
  4. Setting the Defaults for PUTTY (20th September 2009)
  • Keith

    Good tip, I definitely have made this mistake before and I think I’ll change this setting when I get back to work on Monday.

    • http://etherealmind.com Greg Ferro

      Make sure you change all your existing sessions that you have configured as well as the global setting (which would be used for all future session).

      • Keith

        Definitely. Will do, thanks Greg.

  • Brannen

    Good tip – and I’ve made that mistake, fortunately I wasn’t in config mode. But after getting used to it, it’s a real time saver.

  • Andrew

    I must have something wrong with me.. I like the automatic selection and the right click pasting, and wish Gnome Terminal worked the same way.

  • http://blogg.kvistofta.nu Jimmy Larsson

    Strange. I¥v never seen right click paste as a problem. Actually its one of the best features of putty imho.

    If you accidently push buttons you should consider taking back control of your body. :-)


    • http://twitter.com/Telanis_ Telanis

      “Accidentally” is not the problem, it’s the completely unexpected action that’s inconsistent with the rest of the platform.  If you’ve gotten used to it and like it that’s great, but it sucks hard when you’ve selected text and are just trying to bring up a context menu.

  • Stu

    MANY MANY Thanks for your post! I’ve been battling with that for quite a while as the right-click and manu paste has become a habit that is hard to break. When working in equipment, this has indeed caused problems for me. I had to take a moment out from my work to see if there was a fix for this for Putty. Otherwise, Putty is an excellent tool and I am extremely grateful that the authors have shared it with all.

  • http://fontsbytes.com/ FONTSBYTES.COM

    why didn’t say what one needs to do to save that settings change? common man

  • Brad Stephens

    FYI, the keyboard shortcut to paste is shift+insert.

  • Renato Guimaraes

    If you’re like me and have a lot of putty sessions saved, you can edit the registry by exporting the HKCUSoftwareSimonTathamPuTTYSessions key and editing the following entry accordingly:


    I use Notepad++ to quickly find/replace the setting. Save it then import it to the registry again.
    Voila, all putty sessions configured. :)