You are here

A bug and a brief instructions to use with Putty Agent with a little coding newbie guide.

1 post / 0 new
Crispy
Offline
Last seen: 16 years 11 months ago
Joined: 2008-01-05 18:37
A bug and a brief instructions to use with Putty Agent with a little coding newbie guide.

I personally tend to always use keys for logging in and only start putty via the putty agent. Also I did not like the behaviour of putty portable where the last putty window is closed you need to run putty portable again. Behviour that puttys sessions are in the registry all the time the agent is running is what I wanted.
Also being nicely portable it allowed my to store my private keys, and sessions on a truecrypt volume for security reasons.

A brief description of putty agent for those that don't reguarly use it. Basically it allows you to authenicate against keys which putty can then use to login rather than password. Putty agent looks for a putty.exe in the same directory. There will be an icon set in taskbar and you will have the option to start another putty session as well as access saved sessions stored in the registry.

Seemed fairly easily to do I thought just add pageant.exe App\putty while keeping putty.exe in the same dir and use the ini file to change the excutable.
This is where I found a BUG the PuttyPortable does NOT read in the excutable variable from the ini file although it does the splash screen option.

Ok so in frustion I thought I take a stab at the source which comes with (I am new to portable stuff).
I looked at the putty source files and seemed PuTTYPortable.nsi was the one I needed to change. Ok so get it compiling without changes first.
Grab the compiler from http://nsis.sourceforge.net/Main_Page.
You will also need to download some plugins just read the error msg at bottom each time you run and find the relevant plugin at http://nsis.sourceforge.net/Category:Plugins. Now another pitfall you will hit is that the plugin newadvsplash has change something, at bottom of the script "newadvsplash::wait" has now become "newadvsplash::stop /WAIT".

Just to get working I changed the varible in the source !define DEFAULTEXE "putty.exe" to be pageant.exe but obviously changing the ini file would be better.

So now you should have an updated putty portable.exe, pageant.exe in your App\putty dir and putty.exe still there (you can rename puttytray.exe to putty.exe if you want transparant puttys). Most people start there putty agents via a windows shortcut so you can add you key file as a argument and you can do the same thing with the puttyportable.exe.

Now to see puttyagent icon you will need explorer so for a bare bones bartpe its not much use but I like to use portable apps on normal windows so suits me perfectly.

Well I hope this post helps someone else!

Crispy