I needed to have rw for user only permissions on config. This fixed it.
chmod 600 ~/.ssh/config
As others have noted below, it could be the file owner. (upvote them!)
chown $USER ~/.ssh/config
If your whole folder has invalid permissions here’s a table of possible permissions:
Path | Permission |
---|---|
.ssh directory (code) | 0700 (drwx——) |
private keys (ex: id_rsa ) (code) |
0600 (-rw——-) |
config |
0600 (-rw——-) |
public keys (*.pub ex: id_rsa.pub ) |
0644 (-rw-r–r–) |
authorized_keys (code) |
0644 (-rw-r–r–) |
known_hosts |
0644 (-rw-r–r–) |
Sources:
- openssh check-perm.c
- openssh readconf.c
- openssh ssh_user_config fix_authorized_keys_perms