Skip to content

Instantly share code, notes, and snippets.

@atareao
Created September 7, 2019 05:47
Show Gist options
  • Save atareao/ec0c0cce7d609edb59b981e95126cbaf to your computer and use it in GitHub Desktop.
Save atareao/ec0c0cce7d609edb59b981e95126cbaf to your computer and use it in GitHub Desktop.
Search in ssh config
sshs(){
OIFS="$IFS"
IFS=$'\n'
for l in $(cat ~/.ssh/config | grep -i "$1" | grep "#")
do
echo ${l:5}
done
IFS=$OIFS
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment