ssh: handler?

Topics: User Forum
Oct 31, 2006 at 3:39 AM
You mention having a default handler for ssh, but I do not see it included in the release.

I've set up a ssh: url map, but putty throws error about not being able to find host. Any suggestions?

Thank you!
Oct 31, 2006 at 9:51 PM
The ssh: handler option on the "Basic" tab is only displayed if PuTTY.exe can be found under c:\program files\putty\ (actually, the "c:\program files" part depends on the language version of Windows).

If you want to set it up manually you'd enter the full path of UrlConf (not of PuTTY!) into the Program field, and the following into the Parameters field (only replace the path with the full path to PuTTY.exe), with quotes and all:

"%1" port=22 -- "c:\program files\PuTTY\PuTTY.exe" -P $p $h

Yes, this is obscure and undocumented. Well, actually it's documented in the source. ;-) Thanks for reminding me to add some kind of online help.
Nov 8, 2006 at 3:31 PM
I'm trying to make this work as well. I exported a working "telnet" URL handler from the registry, which looks like this:

Windows Registry Editor Version 5.00

@="URL:Telnet Protocol"
"URL Protocol"=""




@="C:\\Program Files\\PuTTY\\putty.exe -telnet %1"

Then I changed all occurances of "telnet" to "ssh" and imported it back into the registry. Everything went in smoothly. But then when I try to run "ssh://ip-address", I get a pop-up window saying host "ssh" does not exist. On the other hand, "telnet://ip-address" works fine.
Nov 8, 2006 at 3:53 PM
Adding the "Parameters" got PuTTY to start -- though it seems to start without the parameters. Here is the export of my "ssh" registry entry:

Windows Registry Editor Version 5.00

@="URL:SSH Protocol"
"URL Protocol"=""




@="C:\\Program Files\\PuTTY\\putty.exe"
"Parameters"="\"%1\" port=22 -- \"c:\\program files\\PuTTY\\PuTTY.exe\" -P $p $h"
Nov 8, 2006 at 4:33 PM
Turns out, PuTTY can handle the "telnet://ip-address" URL, but not something like "ssh://ip-address".

I ended up getting it work with a script, cygwin and openssh. Here is my "ssh.bat" script which is used in the ssh URL handler as the value for "command":

@echo off

c:\cygwin\bin\bash -c "echo %1 ; ssh `echo %1 | cut -d/ -f 3`"
Nov 8, 2006 at 8:01 PM
UrlConf does basically the same as your script: it cuts the URL into pieces and feeds it to PuTTY in a way it can understand.

If you installed PuTTY in "C:\Program Files\PuTTY" you should be able to configure it you easily: just remove your existing ssh: handler and turn on "Use PuTTY to handle the SSH Protocol" on the "Basic" tab of UrlConf. :)

Btw., when I mentioned "Parameters" I meant the text field of that name in UrlConf which you can reach by double-clicking on an URL handler listed on the "Advanced" tab. Regedit (or a similar tool) isn't needed to configure an URL handler using UrlConf; of course you can use it to see what's going on behind the scenes, though.