The default file permission on Linux is
777, which means everyone can read, write and execute the file. It's fine for most of the scenario, but it's another story when it comes to SSH private key. If you try to establish an SSH connection with a too open private key,
WARNING: UNPROTECTED PRIVATE KEY FILE! will be shown.
To solve the problem is quite easy, simply change your SSH private key's permissions.
In the following, we will take
~/.ssh/id_rsaas an example, change it to your actual key path.
Change it to only readable by the owner:
sudo chmod 400 ~/.ssh/id_rsa
Or grant read and write permissions to the owner:
sudo chmod 600 ~/.ssh/id_rsa