• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1226
  • Last Modified:

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!
1 Solution
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 windows...at 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.

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

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

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now