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.8
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /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 directory
debug1: identity file AWS.pem type -1
debug1: key_load_public: No such file or directory
debug1: identity file AWS.pem-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.9
ssh_exchange_identification: read: Connection reset by peer
I 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.
ssh -i AWS.pem ubuntu@www.myserver.com
) – Arnaud May 23 '16 at 18:54www-data
work? – figgyc May 23 '16 at 18:57ubuntu
,www-data
orroot
– Arnaud May 23 '16 at 18:58