The error message you're seeing indicates that the permissions on your private key file are too open. SSH requires that your private key files are not accessible by others to ensure the security of your SSH connection.
To fix this issue, you need to change the permissions of your private key file so that only you can read and write to it. You can do this by running the following command in your terminal:
chmod 600 tapinssec2.pem
This command sets the permissions of the file tapinssec2.pem so that only the owner of the file (you) has read and write permissions, and no one else can access it.
After changing the permissions, you should be able to use the private key to access your private instance via your public instance without encountering the warning message.