Last active
August 29, 2015 14:10
-
-
Save rrichards/2ebe52c06a8ae383df09 to your computer and use it in GitHub Desktop.
Generate aliases for machines in ~/.ssh/config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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