Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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