Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Auto SSH session aliases for hosts configured in ~/.ssh/config
# Auto SSH session aliases for hosts configured in ~/.ssh/config.
command_not_found_handle() {
if [[ ! "$1" ]] ; then
return 127
fi
if ! grep -q "^Host $1\$" ~/.ssh/config; then
return 127
fi
ssh $*
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.