7

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.

Finn
  • 209
  • 1
  • 2
  • 5

3 Answers3

20

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.

melsayed
  • 1,122
  • 1
  • 6
  • 12
0

Please follow below steps to achieve this.

  1. Please create a user with below command

sudo adduser new_user

  1. Then fire below command to edit the parameter PasswordAuthentication. Make sure it's uncommented and set to yes

sudo vi /etc/ssh/sshd_config

  1. After step number 2, please fire below command

sudo service sshd restart

  1. And then generate the password for the user

sudo passwd new_user

Now you are all set to login now with user name and password. Make sure to use public IP of the server while logging in

-2

Try:

#sudo passwd username

Then enter your desired password.

HopelessN00b
  • 53,795
  • 33
  • 135
  • 209
sfault
  • 164
  • 7
  • Thanks a lot but i tried to create a new user in EC2 instance using command line and provided password but when trying to connect using eclipse, could not succeed. Any idea? – Finn Nov 22 '12 at 06:37