EC2 login without keypair

I do not want to use keypairs everytime I login to my ec2 instance. Is there an alternative? Please help me out with this.
Thanks in advance.

Hey Digvijay, you can instead set up password based login for your instance.
Here’s how you can do so:

  1. Create a user account.

    adduser amrutha
    (or)
    For older versions:

    sudo useradd -m amrutha

  2. Create a password for the user.

    sudo passwd amrutha

  3. You can give root permissions for the user.

    sudo visudo

In the above file add, amrutha ALL=(ALL)ALL
under the line, root ALL=(ALL)ALL

  1. You can enable password based authentication.
    sudo vi /etc/ssh/sshd_config

Uncomment the line - PasswordAuthentication yes

  1. Finally, reload ssh configuartion.
    sudo /etc/init.d/ssh reload
    (or)
    Daemon:
    sudo /etc/init.d/sshd reload

Now you can logout and login back with your username and check that it worked.

Hope this helps! =)

It worked for me. Thanks a lot :slight_smile: