Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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