Home Command line utilities Eternal Terminal – A Remote Shell That Automatically Reconnects Without Interrupting The Session

Eternal Terminal – A Remote Shell That Automatically Reconnects Without Interrupting The Session

By sk
Published: Last Updated on 2.6K views

Eternal Terminal (ET) is a remote shell that automatically reconnects without interrupting the session. Unlike the normal SSH session, ET session will survive even after the network outages or IP changes. Please note that ET is not a terminal emulator, it's only a remote shell. ET is mainly made for IP changes. That means even if the IP address of your remote host is changed, Eternal Terminal will keep you connected with the remote system.

Another notable feature of ET is we can run tmux or screen inside an ET session. ET supports tmux control mode which lets you have OS scrollbars, tabs, and windows. This is where ET distinguishes itself from other similar applications like Mosh (A popular alternative to SSH). Even though Mosh offers the same functionality as ET, it does not support scrolling nor tmux control mode. In a nutshell, ET is a remote terminal for the busy and impatient!

Install Eternal Terminal in Linux

You should install ET on Server and Client systems.

ET is available in AUR, so you install it on Arch-based systems using any AUR helper programs.

Using Yay:

$ yay -S eternalterminal

ET has an official PPA for Ubuntu users. If you're using Ubuntu and derivatives, run the following commands one by one to install ET.

$ sudo add-apt-repository ppa:jgmath2000/et
$ sudo apt-get update
$ sudo apt-get install et

It can also be installed using Linuxbrew package manager on Linux and Mac OS X systems.

$ brew install MisterTea/et/et

For other Linux distributions, you need to manually compile and install it.

First install the following dependencies.

  • libboost-dev
  • libsodium-dev
  • libncurses5-dev
  • libprotobuf-dev
  • protobuf-compiler
  • cmake
  • libgoogle-glog-dev
  • libgflags-dev
  • unzip
  • wget

After installing the dependencies, compile and install ET as shown below.

$ wget https://github.com/MisterTea/EternalTCP/archive/master.zip
$ unzip master.zip
$ cd EternalTCP-master
$ mkdir build
$ cd build
$ cmake ../
$ make
$ sudo make install

Eternal Terminal Usage

Please note that you must install ET on Server and Client system. By default, ET uses port 2022. If you're behind a firewall or router, you need to open this port. ET uses ssh for handshaking and encryption, so make sure you can be able to ssh into the machine from the client.

The command to connect to your client is similar to sh. To connect with your client system, just run:

et username@password


$ et sk@

Where, sk and are the client system's username and IP address. Enter the remote system's username to access it.

Eternal Terminal

Eternal Terminal in action

Now, you can use the remote client from your local system. To check if it reconnects automatically after a network outage, unplug the network cable and re-plug it or change the IP address of your client. You will see that the connection is still active. Unlike SSH session, you don't have to kill the session and reconnect after a network outage. ET keeps you connected always.


Thanks for stopping by!

Help us to help you:

Have a Good day!!

You May Also Like


Adren July 4, 2017 - 9:16 pm

Mosh (mobile shell / http://mosh.org) also exists with the same feature:
Remote terminal application that allows roaming, supports intermittent connectivity, and provides intelligent local echo and line editing of user keystrokes.

basically, it’s ssh over UDP instead of TCP (hence the capacity to send a Ctrl+C while a long list of output is sent through the communication channel)

DDS July 5, 2019 - 11:19 pm

What does this do that autossh doesn’t?

sk July 6, 2019 - 11:20 am

ET is inspired by couple of projects including Autossh. Autossh is more advanced version of doing “while true; ssh myhost.com”. Although autossh will automatically reconnect, it will start a new session each time. This means, if we use tmux with control mode, we must wait for the ssh connection to die and then re-attach. ET saves valuable time by maintaining your tmux session even when the TCP connection dies and resuming quickly. Hope this answers your question.

Melvin May 14, 2020 - 10:55 pm

Mosh doesn’t support tmux control mode or native scrolling.


Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. By using this site, we will assume that you're OK with it. Accept Read More