I frequently SSH into a remote Linux server of which I am an authorized user. In order to make the communication more secure, I setup the public/private key authentication instead of using password for login. I sent my public key to server's administrator and he added it to ".ssh/authorized_keys" under my home directory. Everything went well right off the bat and I could connect from my Linux laptop to the server without using my password on first attempt.
Now the question - if server's administrator had accidentally placed my public key under another user's "authorized_keys" then could I have logged in as that user?
(PS: If the answer is "yes" then I'd be very very very careful if I were an administrator because seems like somewhat easy mistake to make.)
Let me know if additional information is needed to answer the question correctly.
Thanks!
authorized_keys
file the admin added your key to. BTW - instead of sending the key to the admin, you could probably have usedssh-copy-id
and done it yourself....