How can i create a user with password in EC2 instance?

I have an EC2 instance on which i have set up a Git server. Now to access this server from eclipse plugin outside, i need a username/password for an instance user.

All i can see is that i have user but a ssh key file/ppk file using which i can connect. Can anyboldy help me on how can i create user with password on same instance & access the instance from this user from outside say eclipse?

Regards.


You need to enable password authentication first before setting a user password. To do that:

  1. Edit the sshd configuration file /etc/ssh/sshd_config as root.
  2. Find the parameter PasswordAuthentication. Make sure it's uncommented and set to yes.
  3. Save the file and exit. Restart ssh service for this to take effect.

Now, using the following command to set the user password:

passwd UserName

That's it! You should try to login now without the key file.