# Usage ``` curl -sSL https://gist.githubusercontent.com/ttimasdf/ef739670ac5d627981c5695adf4c8f98/raw/autossh@host1 | \ sudo tee /etc/default/autossh@example curl -sSL https://gist.githubusercontent.com/ttimasdf/ef739670ac5d627981c5695adf4c8f98/raw/autossh@.service | \ sudo tee /etc/systemd/system/autossh@.service sudo useradd -g nogroup -s /bin/false -m tunnel sudo -u tunnel mkdir -p ~tunnel/.ssh # and copy your private key here sudo -u tunnel nano ~tunnel/.ssh/config # add host and key configs here sudo -u tunnel ssh example.com # just make sure to add your host to `known_hosts` # Add the hostname and forwards to /etc/default/autossh@example sudo nano /etc/default/autossh@example # ready to go! systemctl start autossh@example.service systemctl status autossh@example.service journalctl -fu autossh@example ```