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.
$ 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.
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 ../
$ 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 firstname.lastname@example.org
Where, sk and 192.168.43.246 are the client system's username and IP address. Enter the remote system's username to access it.
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.