Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

cwncool

macrumors newbie
Original poster
I've use a terminal command to create a SOCKS proxy through my ssh server (ex. ssh -D 2008 -l user server.here), to which I am then prompted to enter a password, and everything is connected.

For the sake of ease of use (as I need to do this frequently), is there any way I can make a dock icon, or something along those lines, so I can just click it, it runs the command, I enter a password (or maybe even not?) and it's all set? I have tried setting up a workflow in automator to run a shell script, but it is unsuccessful, leaving me with "Run Shell Script failed: Pseudo-terminal will not be allocated because stdin is not a terminal."

Thanks a bunch!
 
you could write an applescript along the lines of
Code:
do shell script "<path-to-your-script>"
save that applescript as an application, then you can put its icon in the dock and click it to run.
 
you could write an applescript along the lines of
Code:
do shell script "<path-to-your-script>"
save that applescript as an application, then you can put its icon in the dock and click it to run.

For AppleScript it would need to run as administrator
Code:
do shell script "<path-to-your-script>" with administrator privileges
See here for more details on using the do shell script command.
 
Code:
#!/bin/bash

ssh -D 2008 -l user server.here

Save this on your Desktop as a file named "StartSSH" (or whatever you like).

Make it executable by typing the following in Terminal:

Code:
chmod 755 ~/Desktop/StartSSH


Then you should be able to double-click the file's icon and Terminal will launch and run the command. Works for me anyway. 🙂

PS---Use an RSA keypair for better security and to avoid having to enter a password each time.
 
Thanks for the helps guys.

Code:
#!/bin/bash

ssh -D 2008 -l user server.here

...

PS---Use an RSA keypair for better security and to avoid having to enter a password each time.

Hmm it would be convenient to not always need a password. Would you mind elaborating on using an RSA keypair? (I'm not sure where to begin...)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.