问题
I can't access to amazon ec2 instance using ssh terminal:
ssh -i new.pem ubuntu@<public-ip>
It says connection closed by <public ip>
and FileZilla stopped working and I am getting this error:
Error: Server unexpectedly closed network connection
Error: Could not connect to server
This all happened after I changed the server's /etc
folder's permissions to 775 to update the php.ini file.
What happened?
回答1:
Sounds like your instance may be hosed following the permission changes.
Take a look at this question: https://serverfault.com/questions/364677/why-is-chmod-r-777-destructive which describes a similar situation.
And a look at this potential resolution: https://serverfault.com/questions/234061/re-gaining-root-access-to-an-ec2-ebs-boot-image
Never had this happen to me so not personally used the recovery technique.
Good luck!
来源:https://stackoverflow.com/questions/24734463/cant-access-to-amazon-ec2-instance