Passing user and password parameters to putty

Dec 10, 2007 at 8:39 AM
I just stumbled upon UrlConf and this is exactly what I have looked for. Very cool!

However, I can´t quite figure out how to pass parameters to putty via an URL. I suspect to use something like:


Is this possible and if so, how does the translation between GET parameters and Putty parameters work?

Jan 6, 2008 at 3:59 PM
Edited Jan 6, 2008 at 4:00 PM
UrlConf uses the class System.Uri (see to cut URLs into pieces. The pieces are then used to construct a command, which gets executed as URL handler. The pieces are referred to by placeholders.

The basic PuTTY handler set up with UrlConf is "PuTTY.exe -P $p$h". $p and $h are placeholders; UrlConf replaces $p with the port part of the URL (System.Uri.Port) and $h with the hostname part (System.Uri.Host). Then the result is run.

There are other placeholders: $q for the query part (System.Uri.PathAndQuery) and $u for the user and password part (System.Uri.UserInfo). E.g., if you have the address "ssh://user:password@servername:port/something/else", then $q is replaced by "/something/else" and $u by "user:password". There is no placeholder for only the user or password, yet.

The placeholders are only "documented" in the source. That's one of the things I wanted to correct for quite a while now, but I wasn't able to make time for it so far.