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.

Revisions

  1. @consolewitch consolewitch revised this gist Jan 14, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions disableRoaming.command
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@ echo ==========================================================================
    echo This will disable openSSH roaming for your user
    echo ==========================================================================
    echo
    ssh -v -T [email protected] 2>&1 | grep Roaming
    ssh -v -T -o StrictHostKeyChecking=no [email protected] 2>&1 | grep Roaming
    if [ $? == '0' ]
    then
    cat <<EOM >>~/.ssh/config
    @@ -14,7 +14,7 @@ host *
    UseRoaming no
    EOM
    fi
    ssh -v -T [email protected] 2>&1 | grep Roaming
    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"'
  2. @consolewitch consolewitch created this gist Jan 14, 2016.
    25 changes: 25 additions & 0 deletions disableRoaming.command
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    #!/bin/bash
    echo ==========================================================================
    echo This will disable openSSH roaming for your user
    echo ==========================================================================
    echo
    ssh -v -T [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 [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