This morning I applied permission 0777 to a folder (with
.ssh) on AWS. After that, SSH access does not work, without any error or message - just hung screen. Anyone help me.
SSH does not allow you to fully open permissions on its folder. Period. Permissions set to 777 means that others can hi-jack your private keys.
Why in the world would you even consider opening a directory containing ssh keys with full permissions?
You DID get messages about this in the log on your server. I would suggest it is a bad idea to provide messages to the user about permissions since it would help the person trying to invade your system. And yes, that also includes protecting you from yourself.