8

Is there a way to open a new terminator pane on a remote server when connected by ssh?

I am looking for something similar to what can be done (according to this answer) by tmux but using terminator instead. I want to ssh to a remote machine using terminator, and then if I split the terminator window, the new shell will open on the remote machine.

2
  • I don't think this possible as every split spawns a new local shell, so having it spawn a remote shell you'd need to make a new session with that split on the remote server. This would be quite different to how screen and tmux works.
    – Bobby
    Commented Sep 20, 2012 at 18:52
  • @Bobby, yeah I figured as much but maybe some superuser out there has a hack ;)
    – terdon
    Commented Sep 20, 2012 at 19:29

2 Answers 2

11

The answer to this problem for terminator and remote systems is to create a terminator profile, where the command it runs 'as a login shell' is the SSH connection string used to access the remote server. It is prefered to have SSH key based authentication or openssh controlmaster/controlpath setup to have connection sharing.

Exerpt of a terminator config for this:

~/.config/terminator/config

[profiles]
[[default]]
 scroll_on_output = False
 exit_action = restart
 scrollback_infinite = True
[[remotehost]]
 use_custom_command = True
 exit_action = restart
 custom_command = ssh user@remotehost

And simply run terminator -p remotehost to use this profile. Each time you 'split' terminals, it uses this profile and thus opens a new SSH connection.

For ssh controlmaster, see: http://www.debian-administration.org/articles/290

2
  • 1
    Almost perfect, thanks! Extra brownie points for suggesting a way this can be done from an already launched terminator (automatically). I am accepting your answer anyway because it is a great solution.
    – terdon
    Commented Feb 5, 2013 at 14:11
  • Terrific. Don't forget run ssh-agent and ssh-add before terminator for SSH key based authentication method
    – Igor Parra
    Commented Dec 24, 2013 at 15:50
2

ClonedSplittingMenu Terminator plugin (https://github.com/ilgarm/terminator_plugins) is what you are looking for. It adds Clone horizontally, Clone vertically menu items and allows reopening of ssh session by splitting the window. Installation is straightforward

mkdir -p ~/.config/terminator/plugins
cd ~/.config/terminator/plugins
wget --no-check-certificate https://github.com/ilgarm/terminator_plugins/raw/master/clone_session.py
# Restart Terminator, go to plugin menu and activate ClonedSplittingMenu plugin

Also checkout a blog post about the plugin http://lazylabs.org/blog/terminator-plugin-to-clone-current-ssh-session/

1
  • This doesn't seem to work anymore with terminator v.1.91
    – nevrome
    Commented Dec 8, 2021 at 10:14

You must log in to answer this question.

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