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'm using ssh extensively and I want to be able to click on a button on the OS X menubar that opens the Terminal and does:

ssh -p myport myserver

Such that I only have to type in my password, and keeps the terminal open until I exit the terminal.

share|improve this question

1 Answer 1

Open AppleScript Editor and paste the following script:

tell application "Terminal"
    activate
    do script "ssh -p myport myserver"
end tell

Save it in ~/Library/Scripts. Then download FastScripts and run it—it will show your script right in the menu bar:

share|improve this answer
1  
You can, in fact, show the system-wide script menu in the menubar (and add and subtract to its contents as desired) by opening AppleScript Editor and in the first pane of its Preferences, check "Show Script Menu in Menubar." –  Zo219 Jul 23 '13 at 20:05
    
True, it's a little hidden. I prefer FastScripts for the ability to set shortcuts right away. –  slhck Jul 23 '13 at 20:19
    
Yeah, I know, and that is cool. I should have added, the main virtue of the system menu is, it's free. –  Zo219 Jul 23 '13 at 20:27

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.