PHP Developer

My notes and thoughts about Linux, WordPress, PHP and many more.

Keepas tips- Copy Paste Putty Username & Password at Command Line

Using Keepas and PuTTY you can make your login secure using a command line tool for communicating with an SSH server. If you are a webmaster, you should be using SSH for uploading and downloading files because they are more secure than using FTP method. SSH encrypts communication between your computer and the SSH server in your hosting company. So if Mr. Bad Guy is monitoring your communications, he will be greatly disappointed.

PuTTY though is much more challenging than FTP particularly that this does not allow storing passwords for security reasons. This means that every time you log on to PuTTY you are required to enter your username and password.

There are solutions for password-less Putty communication to a server such as discussed in this tutorial: http://www.dailyiteration.com/howto-passwordless-ssh-authentication-with-putty/, but it requires knowledge of encryption keys and authentication which is too much for a beginner or novice webmasters.

This short guide will focus on the most efficient method of entering usernames and passwords in the PuTTY terminal- the copy and paste method.

Copy and paste alone is not even secure by design. Your username and password will stay in the clipboard for a very long time unless it is intentionally cleared (through pressing Esc key or other methods). It is even more insecure if you are typing your username and passwords. Assuming the high risk level of key loggers in your computer that are undetected; they can sniff your login information easily if you type it. Therefore the safest way to copy and paste login details from Keepas: http://keepass.info/

Recommendation: It is highly recommended that you do not rely on encryption alone to protect your passwords. You still need a high level security in your computer by installing reputable third party antivirus either Kaspersky, Bitdefender or Nod Eset 32 to detect and prevent these malware from abusing your Windows computer and compromising your login.

Keepas stores password with high encryption and expires password in 10 seconds by default (you can customize this, the lesser the better) after copying it. This makes it highly secure if you are using copy and paste because it is cleared in a very short time from the clipboard.

The less familiar part is how to paste the username and password in the PuTTY terminal. These are the actual steps (for efficiency, open BOTH the Keepas and PuTTY terminal window before doing the steps below):

Step1. Initiate the SSH server connection using PuTTY; this is done by clicking “Open”.
Step2. PuTTY will ask for a username.
Step3. Now right click on the login entry of your Keepas for that specific website then click “Copy Username”.
Step4. Now in the PuTTY; RIGHT CLICK your mouse accurately on the light green colored cursor at the “login as:” field. This will automatically paste your username.

Screenshot:

putty right click paste password

Step5. Press enter key, PuTTY will ask for your password.
Step6. Right click on the Keepas entry of your website and then click “Copy Password”.
Step7. RIGHT CLICK again ACCURATELY on the light green color on the password field. RIGHT CLICKING automatically pastes your password. You won’t see it for security reasons.
Step8. Now press enter key. If your login details are correct, you should be able to connect to your hosting SSH server.

The secret word to become efficient when doing copy paste of login details to PuTTY is doing “RIGHT CLICK”.

TIPS: If you are using Ubuntu; Linux terminal (Accessories – Terminal) can used to connect to the SSH server with the same functionality as PuTTY:
Command is: ssh [email protected]
Of course it assumes your hosting SSH server is using port 22. But in case it is using different SSH port:

Command is: ssh –p 1234 [email protected]
In the example above, SSH port is 1234.

It allows you to paste the username and password from Keepas (works with Ubuntu Wine) by going to “Edit –Paste”. Personally, this is what I’m using when I’m in Linux. I only use PuTTY on Windows.

Featured image credits: Keepas

4 thoughts on Keepas tips- Copy Paste Putty Username & Password at Command Line

  • Cool tip thanks. I had never guessed that if I right clicked on the green cursor that I could paste. Very nice for sites with strong passwords.

    • Me too. I got surprised by that and its not clearly stated in the Putty documentation. What’s cool is that once you have logged in to the server using Putty terminal window; everything you select or highlight with your mouse, it will be “automatically” saved to the clipboard so you can easily paste them anywhere you like. It is why Control- C for copy or Control-V for paste will not work in Putty because of this. TO summarize:

      To copy: select any string inside Putty with your mouse (don’t press right click yet!, simply select or highlight the string with your mouse)
      To paste: right click on the location you want to paste the string.

      Simple as that.

  • Hi:

    In case you want to use PuTTY on Linux you have 2 options:

    1. Using PuTTY linux version:
    Paste text clicking on the mouse middle button.

    Usually Laptops touchpads do not have middle button anymore, so I simulated the middle button, clicking both left and right buttons.

    Since Linux Mint distro I’m using had not this middle button simulation activated (The latest version of evdev, version 2.5, changed the default for the middle mouse button emulation code. This change has disabled emulation of the middle mouse button by clicking the left and right mouse buttons) I needed to enable it manually:

    Enabling the middle mouse button emulation adding this to xorg.conf snippet:

    Section “InputClass”
    Identifier “middle button emulation class”
    MatchIsPointer “on”
    Option “Emulate3Buttons” “on”
    EndSection

    2. Using PuTTY Windows version (on wine):

    Copy and Paste works as in windows.

    In order to connect to console serial ports, Wine needs to be configured to connect its virtual serial ports devices (COM1, etc) to teh real Linux serial port devices (ttyS0, TTYUSB0, etc).

    Since wine handles com ports by having a link to the device (ie /dev/ttyUSB0), in the ~/.wine/dosdevices folder, this link would be created as follows, in order to update your wine profile configs:

    ln -s /dev/ttyUSB0 ~/.wine/dosdevices/com1

    I prefer this second method, since the copy paste works allways, I do not need the middle button simulation (changing Linux distro settings like Xorg parameters) and, the sherry in the top of the cake, it NEVER hangs (occasionally PuTTY for Windows hangs on some winXP installations, LOL).

    Otherwise, in case you do not need/want to install wine, the first method is preferable.

    I hope it helps someone.

    Enjoy.

    Joao

    • Of course, what you mentioned would be very helpful. I have not tried it actually an I find your method a bit complex. Nevertheless it works great to me and would definitely tried it in the future.. Thank you!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

This site uses Akismet to reduce spam. Learn how your comment data is processed.