Skip to main content

Persistent SSH using dtach. Does not break scrollback. Use tmux locally.

Project description

persist-ssh

@readwithai - X - blog - machine-aided reading - 📖⚡️🖋️

Persist ssh connections without breaking terminal scrollback.

Motivation

I use tmux locally but sometimes ssh into a server to do work. It gets annoying when ssh connectios fail so I want to persist shells on remote machines. The standard approach is to use a multiplexer like tmux, zellij or screen. However, these tools tends to break scrollback and it's a bit weird have a terminal multiplexer within another terminal multiplexer. I want something simpler which does not break scrollback. dtach is such a tool. It is a lightweight detacheable connection to a running process.

Installation

You can install persist-ssh using pipx.

pipx install persist-ssh

Usage

persist-ssh server

This will install mosh and dtach remotely. You can press Ctrl+t to detach. persist-ssh wil then reattach to the session by default.

I use persist-ssh with tmux so like to use the name of my tmux window for the remote session. For tis you can use the --tmux option or by adding session_from_tmux_pane = false to ~/.config/persist-ssh.toml.

About me

I am @readwithai. I create tools for reading, research and agency sometimes using the markdown editor Obsidian.

I also create a stream of tools that are related to carrying out my work.

I write about lots of things - including tools like this - on X. My blog is more about reading and research and agency.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

persist_ssh-1.0.3.tar.gz (16.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

persist_ssh-1.0.3-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file persist_ssh-1.0.3.tar.gz.

File metadata

  • Download URL: persist_ssh-1.0.3.tar.gz
  • Upload date:
  • Size: 16.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for persist_ssh-1.0.3.tar.gz
Algorithm Hash digest
SHA256 c7d8c602b695348b449a48b5efb39c73722c7355789e84b5c51a3117a6245b07
MD5 4fa817e0b2158fcc02fbcbb6187865d6
BLAKE2b-256 c92eb8975d127019b0507875287000545f4b75f739ed703ce0974e398522d079

See more details on using hashes here.

File details

Details for the file persist_ssh-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: persist_ssh-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 17.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for persist_ssh-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 226b590e29e47b48edc6ba1c421c3c6981872b598f96d2d36b3bb64e515c5113
MD5 edde95e19bfa8d87aa2708076059e69a
BLAKE2b-256 e997f1758abd08eb6b91165476dd4f9380d87649c0e9218631a23e25ac5e2842

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page