![]() Once this is done, anytime you have a link such as ssh:// you should be able to simply click it and launch PuTTY. Save this batch file to C:\putty_util.bat Please change this to the location of your putty.exe. In this case, putty.exe is located at C:\Program Files\PuTTY\putty.exe. With extract holding just the hostname, we now execute putty.exe and pass in extract as an argument. ![]() We remove the last character as there seems to be a trailing slash present in the input to our batch file. The removal of the first 6 characters is the removal of “ssh://”. Set extract=%var:~6,-1% is telling us to remove the first 6 characters and the last character from var and place that value in extract. "C:\Program Files\PuTTY\putty.exe" %extract% As a result, we must use a batch file (C:\putty_util.bat) to remove the “ssh://” and any other oddities. Unfortunately, PuTTY does not understand arguments which start off with “ssh://”. In the example of ssh://, we will be passing in the string “ssh://” In this case, we are using the application C:\putty_util.bat and passing in the first argument we receive to it. You will likewise want to change the string %1″ to point at whatever application you wish to use. reg file to whatever abbreviation you wish to use for your protocol. Note: You can create any new protocol by changing each “ssh” in this. Now save ssh.reg locally, right click it, and select merge. reg file which points the protocol “ssh” to a batch file located at “C:/putty_util.bat” : Protocol" The key created can always be deleted by later from regedit. reg file will then be merged with the registry. reg file, save it, right click it and select merge. One method of editing the registry is to create a. Point the registry modification to that batch file.Create a batch file that can take in strings such as “ssh://” and massage them and pass them on to putty.exe.Register a new protocol (in our case, let’s call it “ssh”) to Windows’s registry.What if there was a way to create a hyperlink which launches PuTTY? One would be able to launch PuTTY from email clients, browsers, spreadsheets, etc…Īn example link would be: ssh:// This becomes quite a pain with multiple hosts at once. One may say “Jon, all you need to do is run PuTTY, enter the host name you wish to connect to and provide a user name and password.” This process is certainly fine for a single SSH operation. While it is fairly full featured, it is quite cumbersome for generic SSH use. For many in the tech industry this tool is absolutely crucial. PuTTY enables Windows users to access *nix machines through SSH. For awhile now, I have wanted the ability to launch putty from a simple hyperlink.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |