Putty – Save Passwords

Ever since I started working on multiple servers on a regular basis I have been looking for a solution in which PuTTY is able to store passwords for the target machine. Now I think I have what can be deemed the closest thing to that (without applying keystrings or 3rd party programs), login sessions which are seeded with the relevant passwords though batch scripts.
First create and save putty session with username@IPAddr  and whatever other details are required from with PuTTY.
Next, open Notepad++ (or your preferred text editor) and create a windows batch (*.bat) file with following lines:
     cd c:\Program Files\Putty\
     putty -load "saved session name" -pw "password"
and save it like “session name.bat”
*** On some systems,especially 64 bit OS’s, Putty may be installed in “Program Files (x86)” instead of “Program Files” so make the necessary adjustment to the lines above.

Now just by double clicking on this batch file, you will be automatically logged on to the server without prompt for password. Downside is unencrypted password on your computer. You could explore using a bat-to-exe compiler which would help to mitigate some of the risk, at least from a casual prowler. ^_^
Advertisements

8 thoughts on “Putty – Save Passwords

  1. I really can’t stand the fact that putty doesn’t make it optional .. the authors have made the choice for you that it’s a bad idea to store your passwords incase someone gains physical access to your computer.. that’s silly .. They should allow the end user to make that call .. I manage dozens of servers and my workstation is in a secured, access controlled environment.. nobody is getting in there, and if they do .. they have physical access to the equipment anyway..

    Putty devs should allow us to make that decision and perhaps add a warning if you choose to save your password.. it’s almost arrogant in a way to have them making that choice for me without providing even an option..

    • For this and other reasons I started to use the ssh key agent with a password protected key. Since then I have also dropped putty fully for Cygwin. Getting SSH public agent working with that was not very straight-forward but after getting it to work, it’s like a dream. It’s like what DOS should have been (I need to do a post for that too)

    • This is nice. But I don’t use Putty anymore, I use Cygwin which I think has an implementation of SSH which feels more like I am on a real Linux terminal.

      I guess there are also other reasons I switched. I decided to move my authentication method to use public-keys but the thing that bugged me out about Putty is that the keys it generated were not compatible with most other OpenSSH clients. This meant I had to have a separate key for Putty besides the one I use on my phone, laptop, etc.

      So yeah, I found CygWin took care of this and I have been using it as my preferred Windows based “linux-bridge” for the last6 months or so.

    • Well if you didn’t encrypt it, but you can open the file and view it. If you did the you are out of luck.
      If you have admin access to the box you might be able to reset the root password in single user mode, then don’t forget it!

  2. I am now not certain the place you’re getting your info, however good topic. I needs to spend some time learning more or figuring out more. Thank you for magnificent info I was on the lookout for this information for my mission. ekbgeedddeae

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s