Remove key pair on ec2 ubuntu instance

-1

I have an Amazon ec2 instance running Ubuntu. I set it up with a key pair to authenticate, but now I want password authentication. How do I remove the key pair and replace it with a password?

Jared Goodman

Posted 2017-02-24T20:40:02.157

Reputation: 1

Answers

0

It is strongly recommended to use a key to access your instance. But if you really want to do it. This is how:

  • Go to /etc/ssh/sshd_config
  • Look for PasswordAuthentication no and change it to PasswordAuthentication yes
  • Restart your SSH server sudo service ssh start

If you want to disable key authentication, change PubkeyAuthentication yes to PubkeyAuthentication no

Algeriassic

Posted 2017-02-24T20:40:02.157

Reputation: 723