-2

I have a linux server and have created a new user with useradd. However, for that user to log in, they need an public key. I have my own public key, but it lets me log in as root, so I assume it would let them do the same.

How do I provide the new user with the proper keys while preventing them from logging in as root?

1 Answers1

2

Each user must create his own key pair (public + private) then the user keep the private key and give the public key to sysadmin.

The sysadmin (you) import the user public key into ~/.ssh/authorized_keys file.