Skip to content

Instantly share code, notes, and snippets.

@perigrin
Created February 10, 2017 15:53
Show Gist options
  • Save perigrin/af95fce85bfd5b8fdfd89097f91658b1 to your computer and use it in GitHub Desktop.
Save perigrin/af95fce85bfd5b8fdfd89097f91658b1 to your computer and use it in GitHub Desktop.
SSH_BIN=`which ssh`
alias machine_list="cat ~/.ssh/config | egrep '^Host' | grep -v '\*' | cut -d ' ' -f 2"
# Setup SSH aliases
for MACHINE in `machine_list`
do
alias $MACHINE="TERM=xterm-256color $SSH_BIN $MACHINE"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment