Just an FYI...
We use PLINK to handle the actual connection to the host. This allows us to not only provide the ability to use a userid and password based sign on, but also if you specify a PUTTY 'Saved' connection you can connect using private keys.
Basically we take the server name and look it us as a PUTTY saved session. If found we use that sessions setting to make the connection.