Skip to content

Instantly share code, notes, and snippets.

@ericanderson
Created January 13, 2012 16:58
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 ericanderson/1607514 to your computer and use it in GitHub Desktop.
Save ericanderson/1607514 to your computer and use it in GitHub Desktop.
Host *
ServerAliveInterval 30
ServerAliveCountMax 2
ControlPath ~/.ssh/master-%r@%h:%p
ControlMaster auto
#!/bin/bash
SSH_OPTIONS=" -MNf"
export AUTOSSH_GATETIME=0
export AUTOSSH_PORT=0
function makefast {
HOST=$1
shift
ADDITIONAL_ARGS=$@
CMD="autossh -M 0 -f -- $HOST $SSH_OPTIONS $ADDITIONAL_ARGS"
`$CMD`
}
makefast bamboo@bamboo
makefast gerrit
makefast jira
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment