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

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

You must log in to answer this question.

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