Search code examples
pythonamazon-web-servicesselenium-webdriveramazon-ec2putty

Fatal error: putty Cannot connect to my ec2 instance


It's my first time on aws and i want to upload a python script on ec2. Everything goes smoothly but when i try to connect to the server using putty, i get the following error: enter image description here

I have no idea how to proceed. I am using linux mint 18 and one of the ubuntu instances in ec2 Any ideas? The associated questions aren't helping.


Solution

  • Unlike the command line SSH client on Linux machines, PuTTY expects you to enter only the hostname, here just ec2-18-188-53-9.us-east-1.compute.amazonaws.com, in the field "Host Name (or IP address)".

    You'll need to enter the user ubuntu in the "Auto-login username" field under Connection -> Data, or leave it blank and enter it when you connect. You'll also likely need to provide the location of your private key under Connection -> SSH -> Auth.