Last active
January 15, 2016 08:14
-
-
Save consolewitch/49f42190406667cbbbee to your computer and use it in GitHub Desktop.
OSX GUI executable script to fix CVE-2016-0777 vulnerability
This file contains hidden or 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 | |
echo ========================================================================== | |
echo This will disable openSSH roaming for your user | |
echo ========================================================================== | |
echo | |
ssh -v -T -o StrictHostKeyChecking=no [email protected] 2>&1 | grep Roaming | |
if [ $? == '0' ] | |
then | |
cat <<EOM >>~/.ssh/config | |
# | |
# disable openSSH roaming to protect against CVE-2016-0777 | |
# | |
host * | |
UseRoaming no | |
EOM | |
fi | |
ssh -v -T -o StrictHostKeyChecking=no [email protected] 2>&1 | grep Roaming | |
if [ $? == '0' ] | |
then | |
osascript -e 'display notification "I was unable to fix your vulnerability - please notify operations"' | |
echo "I was unable to fix your vulnerability - please notify operations" | |
else | |
osascript -e 'display notification "You are no longer vulnerable"' | |
echo "You are no longer vulnerable" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment