The instance is launched and I can connect perfectly from my computer. However when I am trying to upload a file to ec2 using the following command:
scp -r -i key.pem path/file ec2-54-195-205-200.eu-west-1.compute.amazonaws.com:/media/ephemeral0/
I have always the following error: Permission denied (publickey). lost connection