Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

up vote 1 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

 
discard

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.