Is it possible to connect a EC2 Linux instance via ssh without the key pair?

13,412

Solution 1

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.

Solution 2

vi /etc/ssh/sshd_config


- PasswordAuthentication no
+ PasswordAuthentication yes

service sshd restart
Share:
13,412

Related videos on Youtube

Jan Deinhard
Author by

Jan Deinhard

Updated on September 17, 2022

Comments

  • Jan Deinhard
    Jan Deinhard over 1 year

    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?

  • Jan Deinhard
    Jan Deinhard almost 14 years
    Actually I'm very concerned about security, but I don't like to carry the pem files arround.
  • Kishan K
    Kishan K almost 8 years
    you should work on your formatting
  • Brennen Smith
    Brennen Smith almost 8 years
    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.
  • Skaperen
    Skaperen over 7 years
    i have and use just one ssh id for all the instances i launch and just one key-pair for it. if you want to use many different ones, look at ssh-agent to secure them for you. keys are better than passwords.