I'm working with an Amazon EC2 instance and at some point, I wanted to chown a directory recursively, and it looks like I applied the command to the whole file system. As a result, it is possible that most files now have ubuntu:www-data ownership.I didn't know how to revert that, and I realized this might be a problem only after I logged out of the instance. Now, when I try to ssh to my instance, I get the following error:OpenSSH_6.9p1, LibreSSL 2.1.8debug1: Reading configuration data /etc/ssh/ssh_configdebug1: /etc/ssh/ssh_config line 21: Applying options for *debug1: Connecting to www.myserver.com [Server IP address] port 22.debug1: Connection established.debug1: key_load_public: No such file or directorydebug1: identity file AWS.pem type -1debug1: key_load_public: No such file or directorydebug1: identity file AWS.pem-cert type -1debug1: Enabling compatibility mode for protocol 2.0debug1: Local version string SSH-2.0-OpenSSH_6.9ssh_exchange_identification: read: Connection reset by peerI don't have any other access to the server than SSH. Is there something I can do to access my server?Note: this is not a duplicate of Accidental chown under / as root since my issue is not about reverting the chown but about logging back into the server.
Locked myself out of Amazon EC2
ssh;permissions;amazon ec2