On my Linux server I have configured the root user to use an SSH key, and I added a new user with SSH key access, but that user can use the same key. I want to know if this is normal, or if each user should have a unique key for signing in remotely.
When I configured the new user, I switched to that user then pasted the contents of the id_rsa.pub file that was generated when I created an SSH key for the root user to /home/user/.ssh/authorized_keys. This is probably why they both have the same key, but when I tried generating a new key and pasting the id_rsa.pub file contents for that key instead I got a (publickey) error when I tried logging in as the new user.
In other words, if the the two users don’t share the same id_rsa.pub contents I can’t login with the one that’s different. How can I configure it so that each user has a unique key?