There is a webpage hosted at unix server serverX .The contents of the web-page are shown below.


Now user1@server1 user2@server2 user3@server3 are links.In case,If I want to log into unix account user1@server1 then, I can click on say user1@server1 ,then that should launch putty.exe with arguments user1@server1 from my local PC.So,this means that I will not need to launch putty.exe myself and then type in the server-name and user-name .This whole thing will be automated and will happen on just clicking on the link.Is this possible to implement ?

  • I am running Windows 7. – g4ur4v Nov 24 '12 at 15:50
  • 1
    Are you willing to say what you want to do with this? perhaps there's a simpler way to achieve your desired result? – Didi Kohen Nov 24 '12 at 16:05
  • Does the application itself have to run on the Windows machine, or would it be sufficient when it only displays on the Windows pc? The latter is pretty common practice. – jippie Nov 24 '12 at 17:40
  • Hi...what I am trying to do is.First,I login into remote unix account(username@server) using putty.Secondly,after logging into unix account.I run some command/script in unix terminal to start say notepad.exe on my local PC ,So actually I should be able to start a program on my local PC and that program will be trigerred from the unix account I am logged in. – g4ur4v Nov 24 '12 at 18:26
  • @g4ur4v I believe the question about what you want to do was meant more like "Why would you want to do that?". Note, that the application running on your PC won't be able to access the files on the unix box if that's what you're after. – peterph Nov 24 '12 at 19:53

I'm not entirely sure why you'd want to do this. Here's a rephrase of your question which I'll use as the basis of my answer:

How can I launch a program on my computer from a webpage, passing information from the host as command-line arguments?

Because of security restrictions, Javascript cannot execute system commands on the client. Possible ways to accomplish this (in order of preference):

  • Set up local server and use AJAX
    • Server exec's commands from the client
    • The game Mabinogi does this to launch the game from their site
  • Use Flash or Java- They're plugins, so they execute outside of the browser sandbox
  • Set up SSH tunnel between server and your computer
    • Might have trouble getting a GUI application to run

I really only like the first option. The server would be pretty trivial to write. I'm not sure how much programming experience you have, but this can easily be done in nearly any scripting language (Python, Ruby, Javascript with node.js, PHP) or a modern compiled language (like Go).

This approach has some drawbacks, like you have to have the server installed for the page to work, but overall I think it's the best option.

However, if you just want a simple way to access remote servers without having to open putty first, I'm sure you could make a few launchers using putty's command-line parameters. Search Google for specific parameters to pass it.

| improve this answer | |

If you're running Firefox, you could set up an SSH handler, this website describes how to do so:


The same handler might for for Chrome too since it's registered with Windows?

| 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.