Wednesday, February 15, 2012

Launch Putty without Password…

We can pass dynamic parameter to Putty and create a new session. Sometimes DBA/Unix Admin may need to connect to many UNIX servers frequently, this may help. I used to have the username/password in excel sheet, so I thought why don't we combine this and create a macro to call in putty on one click and it worked!!

New session can be created with putty by passing parameter like this...

putty <username>@<servername> -pw <password>
ex.. putty oracle@thdb1d02 -pw bingo

With this concept, I created a excelsheet contains the following columns, which has Username/Password/ServerName and Conn Parameter which concatenates the value as the parameter and also written a small macro to call the putty with this parameter.





Formula for Conn Parameter
=CONCATENATE(A11,"@",C11," -pw ",B11)




Now place the cursor on Conn Parameter column which server you wanted to connect and click the button, it opens the putty session and connects to the server automatically... Don’t forget to place the putty.exe file in "c:" drive as the macro expects the putty.exe file. Have fun… ;)