Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to put a shortcut on my desktop for a command that launches an SSH tunnel. Here's my tunnel connection:

ssh -N -g -D 9999 -i key.pem ec2-user@ec2.compute-1.amazonaws.com

I want this command to be easily accessible from my desktop. How can I make a shortcut for this? My OS is Windows 8. The ssh command works on my command line because I installed Gnu On Windows (gow).

share|improve this question
1  
what OS? Are you using plain vanilla ssh of some sort, or putty? Does putting the command as a shell script or batch file work? – Journeyman Geek Sep 29 '12 at 3:27
    
Windows 8. I'm using Gow to make Linux commands available to my windows 8 terminal – Kevin Lee Sep 29 '12 at 3:35
    
if it doesn't exist, there should be a question as to how to have an ssh tunnel launch with only one click. I would love to know how to do that... – Wijagels Nov 6 '12 at 13:26

Create a simple .bat file with content of @start ssh -N -g -D 9999 -i key.pem ec2-user@ec2.compute-1.amazonaws.com Save that file wherever you want and create a shortcut to it on your desktop.

share|improve this answer
    
what the hell man, it starts hundreds of command line process in a loop. my computer hangs and i need to power it off. – Kevin Lee Sep 29 '12 at 4:23
    
Ouch. That's not supposed to happen. :/ "@start" is just supposed to launch ssh process so that it does not leave an empty command prompt window hanging. Where did you save that bat file? – Mxx Sep 29 '12 at 4:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .