Skip to content

Instantly share code, notes, and snippets.

View DennisGentry-Zoetis's full-sized avatar

Dennis Gentry DennisGentry-Zoetis

View GitHub Profile
@DennisGentry-Zoetis
DennisGentry-Zoetis / fix-ssh.sh
Created December 3, 2022 05:21
If an ssh server is rejecting your keys, run this on the server
#!/usr/bin/env bash
chown -R $USER ~/.ssh
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
chmod 600 ~/.ssh/config
# This unnecessarily closes permissions on .pub keys too, but whatever
chmod 600 ~/.ssh/id_*