Connect EC2 Server Without Keypair

You can enable keyless access on EC2 server that will allow you to connect to the server with username and password. Once you enable keyless access, you need not provide key file location under putty to access the server.

Just give server hostname (or public ip address) and connect via putty.

Note: enabling keyless access is not at all recommended and do not use it for production servers.

Enable password auth

You must first enable the server to ask for user passwords under /etc/ssh/sshd_config

vi /etc/ssh/sshd_config
change PasswordAuthentication from NO to YES

Restart the network services

systemctl restart sshd.service

Test keyless connectivity

Open putty, give the EC2 server hostname and click on connect. Make sure you are not giving the location of key file under putty.

You should be able to connect to the server by giving username and password!

Was this article helpful?

Related Articles

Leave a Comment