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 still fairly new to the MAC and I have been seeking a way to script or use the GUI to accomplish the following.

Open Iterm to a group of hosts and ssh to each of them in a tabbed view.

In the gui I can do

New Window -->> Profiles -->> open Profile I created

This gives me a single window that will execute an ssh command to a single host.

Any help or direction greatly appreciated.

I have read through the similar questions before posting as none of them seemed to solve my issue.

share|improve this question
    
Which posts exactly did you read, what did you try? –  slhck Jul 30 '13 at 20:14
    
hints.macworld.com/article.php?story=20070711123202297 This is the first hit I have found that seems to match what I am hoping to accomplish. Prior to this I had read several threads related to iterm/ssh iterm/applescript etc. –  Glenn B. Jul 30 '13 at 21:42
add comment

1 Answer

up vote 2 down vote accepted

Uh-huh. If I got things right, you can do that just right with the iTerm2.

First, create the needed profiles in Preferences - Profiles. You can use a "Send text at start" box to send whatever command you need when you open that profile. For example, let's use ssh root@192.168.1.1:

iTerm2 Preferences - Profiles

Second, you have to create a desired arrangement. For that, just create the tabs or splits you need with the needed profile. You can add new tabs with Profiles - Open (Cmd+O) in the menubar. Just select the profile and press the button (New Tab / Split):

Profiles - Open...

You also can change profile of the existing tabs/splits by right-clicking the content of that terminal and choosing Edit Session....

When you have the desired window/tab/split layout, save it via Window - Save Window Arrangement.

And now, you finally can use Window - Restore Window Arrangement to load everything automatically.

iTerm2 is a very powerful tool, you can tweak it for your needs, assign some hotkeys to make actions faster and whatever.

share|improve this answer
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.