Keeping SSH sessions alive with autossh

I spend a lot of the day in SSH sessions and my network is not reliable. The connection drops, the terminal hangs, and I reconnect by hand. I got tired of that and wrote assh, a small wrapper script that uses autossh to reconnect automatically when the link goes down.
There is a short demo video.
Install#
curl --silent -o- https://raw.githubusercontent.com/meanii/assh/main/install.sh | sudo bash
It asks for sudo because it copies the script to /usr/local/bin/assh. The script is short, so read it first if you prefer.
Use#
assh <ssh-connection-string>
Pass it the same connection string you would give ssh.
The source is at github.com/meanii/assh.
Sign in with GitHub to comment