Configure public key authentication for new user, when password authentication is disabled

0

In an EC2 instance, with Amazon Linux AMI, "PasswordAuthentication" is disabled in "sshd_config" file, and "PubkeyAuthentication" is enabled, by default.

Incase "Linux System admin user" creates new Linux user on the EC2 instance, how the new Linux user ssh to the system? Because password authentication is already disabled.

And if the new Linux user generates public key in his local machine, and try to place it, in the EC2 instance, he could not place. Because currently both Public key authentication and password authentication will not work.

How to overcome this scenario?

1 Answer
0

When Linux system admin create a new user, ask them to create a SSH key for new user and share the private keys with respective user. Then the private key can be used to login to the instance as new user.

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions