Skip to content

Instantly share code, notes, and snippets.

View bbossola's full-sized avatar
💭
CTO at Meterian

Bruno Bossola bbossola

💭
CTO at Meterian
View GitHub Profile
@a-abella
a-abella / strip_github.sh
Last active April 6, 2023 09:54
Remove all github (v4) from known_hosts
#!/bin/bash
##
## IP list generated from api.github.com/meta .git block , https://gist.github.com/a-abella/fb31a028943b804e8ada6cda4efbe9b6
##
KNOWN_HOSTS_FILE="${1:-"$HOME"/.ssh/known_hosts}"
for entry in github.com $( curl -s https://gist.githubusercontent.com/a-abella/fb31a028943b804e8ada6cda4efbe9b6/raw/1fde650fd0e1005a61439065fdedcafde7730bc0/github_git_ip4.txt) ; do
ssh-keygen -f "$KNOWN_HOSTS_FILE" -R "$entry"