I'm new to Linux, I'm having CentOS 7. I want to allow multiple users for one server (Path - /var/www/ folder) using ssh key based authentication.
For that I have created 2 new users from my root account and created ssh key using ssh-keygen
for the first user and transferred that to authorized keys file.
My question
Is when I create ssh
key for 2nd user does the authorized keys file will get over written? If so how do I enable the ssh
key for second user.
As per my knowledge, private key will be kept by the user and public key to be given to the rest. so in that case I need to generate ssh
key from the user account and not from the root, then put that key in authorized keys file.