Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sumit-sampang-rai/45941b6812671daa2e7e76ea0313a95c to your computer and use it in GitHub Desktop.
Save sumit-sampang-rai/45941b6812671daa2e7e76ea0313a95c to your computer and use it in GitHub Desktop.
From ssh config (~/.ssh/config) get all servers list and get the information of OS
for instance in $(cat ~/.ssh/config | ggrep -oP "(?<=Host )[A-Za-z0-9_\-]+$"); do ssh -o StrictHostKeyChecking=no $instance "uname -a"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment