Skip to content

Instantly share code, notes, and snippets.

@hylowaker
Created April 9, 2019 09:26
Show Gist options
  • Save hylowaker/049f84b102dd5535e092367e001e54e0 to your computer and use it in GitHub Desktop.
Save hylowaker/049f84b102dd5535e092367e001e54e0 to your computer and use it in GitHub Desktop.
# list ssh hosts
alias ssh-hosts="pcregrep -M \"^Host .+\n +HostName.+\n\" $HOME/.ssh/config | sed ':a;N;\$!ba;s/Host //gi;s/\\n HostName / : /gi'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment