Created
April 2, 2017 03:12
-
-
Save chadlavi/8d0187b5fe79a663e0381fa1514d8830 to your computer and use it in GitHub Desktop.
bash one-liner to get IPs of all the machines on local network that have ssh running and open
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
nmap -sV -p 22 192.168.0.1-254 | grep 'open\s*ssh' -B 3 | grep 192 | awk '{print $NF}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment