Sign inSign up

demyx/eternal-terminal

By demyx

Updated over 5 years ago

Eternal Terminal is a remote shell that automatically reconnects without interrupting the session.

Image
0

2.2K

demyx/eternal-terminal repository overview

eternal-terminal

Build Status Docker Pulls Architecture Alpine OpenSSH eternal-erminal Buy Me A Coffee Become a Patron!

Eternal Terminal (ET) is a remote shell that automatically reconnects without interrupting the session. Learn how to install and use it here https://eternalterminal.dev.

Inspirations

ET was heavily inspired by several other projects:

  • ssh: Ssh is a great remote terminal program, and in fact ET uses ssh to initialize the connection. The big difference between ET and ssh is that an ET session can survive network outages and IP roaming. With ssh, one must kill the ssh session and reconnect after a network outage.
  • autossh: Autossh is a utility that automatically restarts an ssh session when it detects a reconnect. It's a 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.
  • mosh: Mosh is a popular alternative to ET. While mosh provides the same core funtionality as ET, it does not support native scrolling nor tmux control mode (tmux -CC).
TITLEDESCRIPTION
SSH PORT22
ET PORT2022

Updates & Support

Code Size Repository Size Watches Stars Forks

  • Auto built weekly on Saturdays (America/Los_Angeles)
  • Rolling release updates
  • For support: #demyx

Usage

REMOTE MACHINE: Run eternal terminal server first

docker run -dit \
--name demyx_et \
-v demyx_ssh:/home/demyx/.ssh \
-p 2222:22 \
-p 2022:2022 \
demyx/eternal-terminal

REMOTE MACHINE: Copy authorized_keys to volume

docker cp /home/"$USER"/.ssh/authorized_keys demyx_et:/home/demyx/.ssh

REMOTE MACHINE: Verify authorized_keys is in the volume

docker exec -t demyx_et ls -al /home/demyx/.ssh

REMOTE MACHINE: Restart container so permissions are set

docker restart demyx_et

LOCAL MACHINE: Make ssh alias (~/.ssh/config)

Host example
     HostName example.com
     User demyx
     Port 2222

LOCAL MACHINE: Run et command using alias (assuming et is installed on local machine)

et example

Tag summary

Content type

Image

Digest

Size

47 MB

Last updated

over 5 years ago

docker pull demyx/eternal-terminal