how do i save multiple terminal sessions that are managing remote connections as a window group??

OK, this should be really simple, but I am having trouble figuring it out.  Here's my scenario -- I boot up 5 or six different terminal windows on my Mac that I then use to ssh into different servers to monitor & do some shell scripting.  I have these connections saved as "Remote Connections".

What I'd like to do is "Save as a Window Group" all of my connection windows, so I can just open the Window Group at the beginning instead of running the ssh connection commands everytime.  Seems like it should work, but....when you save as a window group (even when the terminal was explicity started from the remote connections menu) it just starts you up at your regular local shell -- instead of the remote connection, which was the whole point.

Really frustrating -- I expected the "Save as a Window Group" to be smart enough to save me the effort of doing "ssh -2 <user>@<IP>" in each freaking window.   I may have to revert to using PuTTY on my windows machine to save myself the irritation. Please help!
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

would be a little script a solution for you? something like:

ssh -2 <user>@<IP-1> &
ssh -2 <user>@<IP-2> &
ssh -2 <user>@<IP-3> &
ssh -2 <user>@<IP-4> &
ssh -2 <user>@<IP-5> &
herringtownAuthor Commented:
well, the thing is, I am not sure how a bash script that launches ssh sessions in the background fully addresses what I am talking about.

Bascically,  I want a group of windows (which you can save in mac's terminal software) to preserve the fact that they are tied to to a remote connection.  So, when I launch a window group entitled "Audiolunchbox Encoding Farm" it brings up the Mac terminal windows that I saved in that group (with display preferences) and runs the connection.

If there's a way to tie a specific connection script to a terminal window group, I'm all ears. I know you can do this with AppleScript, but I haven't ventured there yet.  

But no, launching ssh sessions in the bg doesn't actually spawn separate terminal least from the terminal -- unless you WERE talking about an appleScript?
An initial effort and onboard feature would do:
1. Setup the Mac Terminal in the way you want it to show up
2. Create your session settings: Preferences -> Start -> Shells open with: [your command string] (e.g.  /usr/bin/ssh -2 username@IP address)
3. when settings are OK, Menue "Shell" -> "Export settings..." -> choose a filename and location -> done.

Repeat the steps 1-3 for all your needed Terminal Windows. The saved documents should be stored in one folder. You can open the folder, select ALL documents by 'Command-A' at once and open them by 'Command-O', as well known.

Do not forget to revert the Terminal to your Standard settings for normal use.

This approach can be used for almost every setting you would need, not only for ssh.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Hi herringtown, any news on this issue?

herringtownAuthor Commented:
hi there!  Sorry, apparently all of my ExpertExchange emails had inexplicably been going into my spam folder, so I didn't receive any of the "new comment" notifications :(  .     I'm going to try your suggestion here and let you know how it goes...thanks!

herringtownAuthor Commented:
final step, saved all as a window group -- all in all, working almost as conveniently as I'd hoped..
this issue is still unsolved. I really would like a solution for this. The point is that saved window groups do not save remote connections. A irritating missing feature in terminal
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Mac OS X

From novice to tech pro — start learning today.