I got the same error and tried all the suggested things, but the issue was that I didn't include the Key Pair while initially creating an Instance, that's why the Key Pair I was using was not working to establish a connection. So, I created a new instance with the expected Key Pair, and right after that, I was able to connect it without any issues. I hope this helps anyone who will face this issue in future.