Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Cause i want to access my own EC2 from different host. It is hard to key the pem file in every host.

share|improve this question
up vote 2 down vote accepted

Assuming SSH access:

# Turn on password authentication
sudo sed -i 's/^PasswordAuthentication.*/PasswordAuthentication yes/' /etc/ssh/sshd_config
# Reload SSHd configuration
sudo service sshd reload
# Set a password for the ec2-user
sudo passwd ec2-user
share|improve this answer
It is almost correct. but when i try to set passwd for ec2-user. passwd: Authentication token manipulation error. It seems that we don't have the default password that amazon gave up... – Kit Ho Jul 30 '11 at 16:24
Perhaps changing it as root! Updated answer. – h0tw1r3 Jul 30 '11 at 16:32
Correct! Thanks~ – Kit Ho Jul 30 '11 at 16:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.