In my Mac, how do I write a script that can do this?
- Open "terminal".
- In that terminal, "ssh myserver"
- Open a new "tab" inside the terminal.
- In that tab, "ssh myserver2"
Then, how would I run this script?
macosterminal.app
In my Mac, how do I write a script that can do this?
Then, how would I run this script?
Best Answer
Open
/Applications/Utilities/AppleScript Editor.app
and enter the following:Save as script or application. Anytime you execute, Terminal will be brought to front (started if necessary), and two new tabs will be created for your SSH sessions.
In this answer I outlined how to check whether a window is already open (without an application running) to prevent opening one tab/window too many.