Make ssh:// links open with PuTTY

There is a Putty fork named Kitty, it's website includes instructions for doing exactly what you want.

It does involve registry changes but these are accomplished by downloading a .reg file and clicking on it in windows explorer (with admin privileges I guess).


PuTTY unfortunately does not associate itself with the ssh:// URLs.

You can associate an application with a protocol manually. See the MSDN article Registering an Application to a URI Scheme.

Basically you add a registry key like:

[HKEY_CLASSES_ROOT\ssh]
@="URL: SSH Protocol"
"URL Protocol"=""

[HKEY_CLASSES_ROOT\ssh\DefaultIcon]
@="\"C:\\Program Files (x86)\\PuTTY\\PuTTY.exe\",0"

[HKEY_CLASSES_ROOT\ssh\shell]

[HKEY_CLASSES_ROOT\ssh\shell\open]

[HKEY_CLASSES_ROOT\ssh\shell\open\command]
@="\"C:\\Program Files (x86)\\PuTTY\\PuTTY.exe\""

Though the above passes a whole URL to the PuTTY command-line. And PuTTY does not understand the ssh:// prefix. So you would have to add a wrapper script that strips the ssh:// and passes only a user and a host to PuTTY.

For that see:
https://johnsofteng.wordpress.com/2009/05/12/launch-putty-from-browser/


Another way is using WinSCP. It registers itself to handle the ssh:// URL and opens the session specified by the URL in PuTTY.

(I'm the author of WinSCP)


See this: https://gist.github.com/sbiffi/11256316

I wanted a solution which does not need to change putty.

It associates a visual basic script to ssh:// and telnet:// URLs, which parses the URL and launches putty using standard parameters like putty.exe -ssh -l login.

2 additional advantages: – Password can be passed in URL also for auto authentication – No need to change putty, thus adapted to all patches.

Tags:

Ssh

Putty