EDIT: The problem was that I was using a bad username (ec2-user) instead of "ubuntu". Sorry guys for wasting your time. :(
Question:
What happened:
I missmoved (-R) the /home of the EC2 to /var/www/html so when I tried to connect to ssh to this machine the connection was refused. I made It work again by moving it back again to /home and changing the permissions from /home/user/.ssh. But now the command scp refuses me:
Permission denied (publickey).
lost connection
So now I'm stucked here.
Things to know:
- I have a kind of backup of the "/home" on "/var/www/html_what" on the EC2 instance.
- I tried to change all permissions of the /home directory to match to another working EC2 instance.
- I also changed the owner:group of each directory inside /home and /home (itself).
Thank you for reading!