Created
December 2, 2016 02:16
-
-
Save benzBrake/4602f3b8367ea1a85934d58e48a4a013 to your computer and use it in GitHub Desktop.
List SSH Ports
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 | |
SSH_PORTS=`cat /etc/ssh/sshd_config | grep 'Port ' | grep -v '#'` | |
FIRST_PORT=`echo ${TEST} | head -n 1` | |
if [ -n ${FIRST_PORT} ];then | |
echo ${SSH_PORTS} | |
else | |
echo 22 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment