Last active
August 29, 2015 14:09
-
-
Save bixu/641b0d22f3353b846726 to your computer and use it in GitHub Desktop.
scan for open public ssh ports on your hosts
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
#!/bin/bash | |
ip_list=$(knife joyent server list | awk '{print $7}' | cut -d"," -f 1 | grep -v "10.*\|192.168.*\|172.16.*") | |
for ip in $ip_list | |
do nmap -A -T4 -F $ip | |
done | grep "Nmap scan report\|ssh" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you're not using
knife
and theknife-joyent
gem/plugin forknife
, then you'll probably want to customize line 3.You should be able to run this directly from this Gist by doing
https://gist.githubusercontent.com/bixu/641b0d22f3353b846726/raw/public_ssh_scan.sh | bash -s