Skip to content

Instantly share code, notes, and snippets.

@sidharrell
Created December 7, 2017 09:01
Show Gist options
  • Save sidharrell/8831cae292d2ceef0ad6c14df1a97559 to your computer and use it in GitHub Desktop.
Save sidharrell/8831cae292d2ceef0ad6c14df1a97559 to your computer and use it in GitHub Desktop.
filter the cruft from /var/log/secure
grep -vE "sshd.*Disconnected\ from" secure | \
grep -vE "sshd.*Received\ disconnect" | \
grep -vE "sshd.*invalid\ user" | \
grep -vE "sshd.*Invalid\ user" | \
grep -vE "sshd.*Connection\ closed" | \
grep -vE "sshd.*Disconnecting" | \
grep -vE "sshd.*maximum\ authentication\ attempts" | \
grep -vE "sshd.*reverse\ mapping\ checking" | \
grep -vE "sshd.*Did\ not\ receive\ identification\ string" | \
grep -vE "sshd.*Address.*maps\ to.*but\ this\ does\ not\ map\ back\ to\ the\ address" | \
grep -vE "sshd.*Bad\ protocol\ version\ identification" | \
grep -vE "sshd.*Connection\ reset\ by" | \
grep -vE "sshd.*Unable to negotiate with"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment