Skip to content

Instantly share code, notes, and snippets.

@joh6nn
joh6nn / auto-screen.sh
Created October 3, 2017 17:11
When logging in via ssh, automatically start a screen session if one is not running. Otherwise, display a list of available screen sessions, and automatically reconnect to the first available session after a timeout
#! /bin/bash
# when logging in via ssh, automatically start a screen session if one is not
# running. otherwise, display a list of available screen sessions, and
# automatically reconnect to the first available session after a timeout
# Copyright (C) 2011 joh6nn@gmail.com
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or