New terminator window on remote server

12,209

Solution 1

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

Solution 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/

Share:
12,209

Related videos on Youtube

terdon
Author by

terdon

Elected moderator on Unix & Linux. I've been using Linux since the late '90s and have gone through a variety of distributions. At one time or another, I've been a user of Mandrake, SuSe, openSuSe, Fedora, RedHat, Ubuntu, Mint, Linux Mint Debian Edition (basically Debian testing but more green) and, for the past few years, Arch. My Linux expertise, such as it is, is mostly on manipulating text and regular expressions since that represents a large chunk of my daily work.

Updated on September 18, 2022

Comments

  • terdon
    terdon over 1 year

    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.

    • Admin
      Admin over 11 years
      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.
    • Admin
      Admin over 11 years
      @Bobby, yeah I figured as much but maybe some superuser out there has a hack ;)
  • terdon
    terdon over 11 years
    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.
  • Igor Parra
    Igor Parra over 10 years
    Terrific. Don't forget run ssh-agent and ssh-add before terminator for SSH key based authentication method
  • nevrome
    nevrome over 2 years
    This doesn't seem to work anymore with terminator v.1.91