Click here to Skip to main content
15,885,196 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
searched a lot but, couldn't find it.
Posted
Comments
Mohibur Rashid 15-Dec-14 8:49am    
you will have to have lot more knowledge than just html

1 solution

So by default Putty doesn't have any URI's associated with it - I'm talking about the part that makes external applications launch..
ftp://
skype://
itunes:// 


So you need to add the protocol to windows registry (the button will only work on the machine you do this on)..

Here's a great tutorial of how to do this: Launch PuTTY from Your Browser – Adding Procotols to Windows[^]


In short, this is what you do:

1. Register a new protocol (in our case, let’s call it “ssh”) to Windows’s registry.
2. Create a batch file that can take in strings such as “ssh://google.com” and massage them and pass them on to putty.exe
3. Point the registry modification to that batch file.

Step 1 - the .reg file, save it as putty.reg, right click it and select merge
VB
REGEDIT4
[HKEY_CLASSES_ROOT\ssh]
@="URL:ssh Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\ssh\shell]
[HKEY_CLASSES_ROOT\ssh\shell\open]
[HKEY_CLASSES_ROOT\ssh\shell\open\command]
@="\"C:\\putty_util.bat\" %1"

Note: change the putty_util.bat location to where-ever you make your .bat (batch file)

Step 2 - the putty_util.bat file, save it in the location you specified in the .reg file
SQL
@echo off
set var=%1
set extract=%var:~6,-1%
"C:\Program Files\PuTTY\putty.exe" %extract%



Try launch a ssh:// link from your browser and see if putty launches
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900