Skip to content

Instantly share code, notes, and snippets.

@rrichards
Last active August 29, 2015 14:10
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 rrichards/2ebe52c06a8ae383df09 to your computer and use it in GitHub Desktop.
Save rrichards/2ebe52c06a8ae383df09 to your computer and use it in GitHub Desktop.
Generate aliases for machines in ~/.ssh/config
# add to your ~/.bash_profile
alias machine_list="cat ~/.ssh/config | egrep '^Host' | grep -v '\*' | cut -d ' ' -f 2"
SSH=ssh
for MACHINE in `machine_list`
do
alias $MACHINE="TERM=xterm $SSH $MACHINE"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment