Every time I have to copy the AWS EC2 public DNS and open PuTTY and connect.

Public DNS: ec2.us-west-1.compute.amazonaws.com

As an alternative, how can I add an on select this public DNS and right show option open with PuTTY for Chrome [ec2.us-west-1.compute.amazonaws.com] (like for example "Search Google for 'something'")
and then on click run an command in cmd say like putty --default-profile selectPublicDNS

Please give me an idea an easy way to do this.


You can make use of the Context Menu Search Chrome Extension.

It can pass the selected text to URLs only though. So you have to use a URL like ssh://%s/ and associate PuTTY with the ssh:// protocol.

PuTTY unfortunately does not associate itself. But you can do it manually. See MSDN article Registering an Application to a URI Scheme.

You can go even a step further and create a user script that turns the host name to clickable ssh:// link.

Inspired by your question, I've wrote a user script to inject SFTP link "Open in WinSCP" to Amazon EC2 management console. You can easily modify it for the ssh:// and "Open in PuTTY".

Though the above passes a whole URL to PuTTY command-line. And PuTTY does not understand the ssh:// prefix. So you would have to add a wrapper script that strips the ssh:// and passes only a user and a host to the PuTTY.

For that see:

See also Can PuTTY open SSH link similar to Terminal for Macintosh?

WinSCP 5.9 (and newer) registers itself to handle the ssh:// URL and opens the session specified by the URL in PuTTY.

(I'm the author of WinSCP)

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