SSH SCP Hyperlink
Following on from a previous post about creating and using an RDP Hyperlink on a computer running Windows, I have written another two .bat files for use with SSH and SCP protocols.
SSH Hyperlink

The first .bat file allows for easy installation/uninstallation of the SSH hyperlink association. It is used for a hyperlink with an associated prefix of ssh://. The bat file will invoke a 3rd party SSH client and establish a connection to the host.
To create and use a hyperlink that is prefixed by ssh:// you will first need to download the latest copy of putty.exe - HERE
Save or move putty.exe (rename to this if different) to C:\WINDOWS\System32\
Download ssh.bat - HERE
Extract and run ssh.bat to create the scp:// hyperlink association on your computer.
SCP Hyperlink

The second .bat file allows for easy installation/uninstallation of the SCP hyperlink association. It is used for a hyperlink with an associated prefix of scp://. The bat file will invoke a 3rd party SCP client and establish a connection to the host.
To create and use a hyperlink that is prefixed by scp:// you will first need to download the latest copy of WinSCP.exe - HERE (use the link for 'Portable executables')
Save or move WinSCP.exe (rename to this if different) to C:\WINDOWS\System32\
Download scp.bat - HERE
Extract and run scp.bat to create the scp:// hyperlink association on your computer.
Notes
After completing the above, any hyperlinks prefixed with ssh:// and/or scp:// will automatically be opened and a connection attempt made.
A hyperlink of:
ssh://someserver
would run putty.exe and attempt to connect to 'someserver'.
For more info about using these hyperlinks on webpages and within Zenoss check:








I get the following error(s) when I try to open my ssh:// link...
----------------
Windows Script Host
Script: C:\WINDOWS\hyperlink-ssh.js
Line: 7
Char: 1
Error: The system cannot find the file specified.
Code: 80070002
Source: WshShell.Exec
Any ideas?
Thanks,
Bill
@Bill
Can you give me a little more information about your environment? What OS are you using? What browser are you testing this with?
I'm using...
Windows 7 Pro (all updates)
Firefox 3.6.15 (latest version)
@Bill
line 7 is trying to execute putty. did you copy the putty executable to C:\winnt\system32 ?
Any solution to this? I get the same problem, it works if i try to run
hyperlink-ssh.js 10.254.4.1 from the cmd-
Hi,
just copy putty.exe in a different directory on your path and modify the c:\Windows\hyperlink-ssh.js script accordingly. E.g.:
var server=(WScript.Arguments(0))
var prefix='ssh://'
var app="C:\\temp\\putty.exe"
server=server.replace(prefix, '')
server=server.replace('/', '')
var shell = new ActiveXObject("WScript.Shell")
shell.Exec(app + " " + server)
I am running Windows 7 and having the same issue. I can run the script from the command line, but I get the same error when trying to execute from a hyperlink. Any suggestions?
For Win7 64bit. If you guys still getting that error, try putting it under this directory rather than system32.
C:\Windows\SysWOW64\putty.exe