Last active
September 16, 2016 00:27
-
-
Save jsidhu/4f8b94df1560c4ed0f23 to your computer and use it in GitHub Desktop.
bash tcp port check
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
timeout 1 bash -c 'cat < /dev/null > /dev/tcp/lmm-kafka-2.ash2.symcpe.net/9092'; echo "Port Check result: $?" | |
for x in $(cat x); do timeout 2 bash -c 'cat < /dev/null > /dev/tcp/'$x'/22' || echo "No SSH to $x"; done |
Author
jsidhu
commented
Sep 16, 2016
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment