Skip to content

Instantly share code, notes, and snippets.

@luca
Forked from consolewitch/disableRoaming.command
Created January 15, 2016 08:14
Show Gist options
  • Save luca/41d85771e18a0500e03c to your computer and use it in GitHub Desktop.
Save luca/41d85771e18a0500e03c to your computer and use it in GitHub Desktop.
OSX GUI executable script to fix CVE-2016-0777 vulnerability
#!/bin/bash
echo ==========================================================================
echo This will disable openSSH roaming for your user
echo ==========================================================================
echo
ssh -v -T -o StrictHostKeyChecking=no git@github.com 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 git@github.com 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