If it doesn't work for no reason, it's definitely a permission issue - like timeout
chmod 700 ~/.ssh chmod 600 ~/.ssh/id_rsa chmod 600 ~/.ssh/id_ed25519 chmod 644 ~/.ssh/id_rsa.pub chmod 644 ~/.ssh/authorized_keys chmod 644 ~/.ssh/known_hosts chmod 600 ~/.ssh/config
SSH files
SSH file Notion
ssh returns "Bad owner or permissions on ~/.ssh/config"
If on Windows Subsystem for Linux (WSL) and you pointed your WSL home directory to your Windows home directory (not recommended!) then chmod has no effect. Before you can chmod the files mentioned in other answers you must add [automount] options = "metadata" to your /etc/wsl.conf then restart WSL (requires build 17093 or later).
https://serverfault.com/questions/253313/ssh-returns-bad-owner-or-permissions-on-ssh-config
rangyu/TIL
오늘 내가 배운 것 (Today I Learned). Contribute to rangyu/TIL development by creating an account on GitHub.
https://github.com/rangyu/TIL/blob/master/ubuntu/SSH-%EB%A1%9C%EA%B7%B8%EC%9D%B8-%EC%A0%91%EC%86%8D-%EC%8B%9C-%ED%8D%BC%EB%AF%B8%EC%85%98-%EB%AC%B8%EC%A0%9C-UNPROTECTED-PRIVATE-KEY-FILE.md

Seonglae Cho