The permissions for ~/.ssh/ folder should be 700. Permissions for authorized_keys file and myKey.pem are to be 600.
1.Generate a public key first (usually from AWS EC2 key)
ssh-keygen -y -f AnalyticsSharedKeyPair.pem > AnalyticsSharedKeyPair.pub
2.Add a new public key to authorized_keys: