Skip to content

Instantly share code, notes, and snippets.

@dex4er
Created October 21, 2014 12:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dex4er/6f6ed990b712440b9b75 to your computer and use it in GitHub Desktop.
Save dex4er/6f6ed990b712440b9b75 to your computer and use it in GitHub Desktop.
autossh
SHELL=/bin/bash
* * * * * . $HOME/.profile && { cd $HOME && run-parts --report $HOME/cron.minutely; }
#!/bin/sh
screen -q -S ssh-test -ls
test $? -lt 10 || exit 0
screen -q -d -m -S ssh-test autossh user@host -R 8888:localhost:8888 -N
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment