Say I have a webpage with something like:

<a href="ssh://foo@bar.com">foo@bar.com</a>

Is there any way to have it launch an ssh terminal?

My preference is that this works on Ubuntu with Chrome.


You can do this by setting up the command in a .cgi script.

| improve this answer | |
  • 4
    Care to expand on how to do this exactly? – Raystafarian Aug 1 '13 at 21:12
  • Put an executable script in the website server designated cgi area (or name it with *.cgi extension). Make sure your configuration allows for CGI scripts. And finally remember that the script will be executing as the apache user! – mdpc Aug 1 '13 at 21:37
  • PS: try looking at the CGI tutorial and mod_cgi info on the apache website. – mdpc Aug 1 '13 at 21:39
  • Thanks for expanding on your answer; but, when you do that (expand on an answer), it makes sense to do it by editing the answer rather than posting a reply comment. Also, providing a link to the tutorial would be useful. – Scott Aug 1 '13 at 23:00
  • 1
    I think you misunderstood the question. This guy isn't trying to run a command on the server... – jjlin Aug 2 '13 at 0:54

If you mean that you want your machine to launch SSH, then you need to change the protocol handler for ssh in your operating system.

There is an example of setting up a protocol handler in Ubuntu here. In Windows you need to alter the registry.

Web sites can't make visitors open client-side custom handlers; it would be a security risk. But a page can have Mozilla and Firefox register a web service as a protocol handler. Documentation for that is here.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.