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

I can connect to my EC2 Linux instance via ssh using the key pair (*.pem). Is it somehow possible to connect it with ssh with out the pem file?

share|improve this question
up vote 5 down vote accepted

You can create a regular user account with a password and use that to log in, but it's not as secure as using SSH keys; you'll be open to script kiddies trying to crack your passwords. You could also enable password access for root if you're really not too worried about security.

share|improve this answer
Actually I'm very concerned about security, but I don't like to carry the pem files arround. – Jan Deinhard Aug 4 '10 at 17:40
ssh with password auth is asking for trouble - especially if you stick with the default ec2 username. But if it's really too much of an inconvenience to carry around an encrypted pem, you can always to 2factor ssh auth with authy or google-authenticator. – Brennen Smith Jun 26 at 4:51
vi /etc/ssh/sshd_config

- PasswordAuthentication no
+ PasswordAuthentication yes

service sshd restart
share|improve this answer
This is what should be, it worked for me. Thanks. – Jirapong Feb 3 '11 at 8:09

You can configure whatever login system you like including turning off keys and using pure password authentication, however this is NOT recommended if you have any interest in keeping your box secure.

Your keys should also be pass phrase protected so that the part you are carrying around isn't a free ride if into your server in case you ever use a compromised local machine. I suggest generating your own keys to do this.

You can keep your private key file in a service like dropbox or saved as an attachment to your email if you need access to it on the road and are worried about forgetting it. The combination of password on your email or dropbox account plus the pass phrase on the key itself should be a reasonable degree of security.

share|improve this answer
# sudo adduser USERNAME
# sudo passwd USERNAME

Edit /etc/ssh/sshd_config :

PasswordAuthentication yes

Then do

# sudo service ssh restart
share|improve this answer
you should work on your formatting – Marki Jun 25 at 21:12

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.