I would like to have two users to be able to edit my authorised_keys file.
Is this possible?
I have tried to add the user to the original user etc/group this didn’t work.
e.g.
user1:xx:user2
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
/etc/grouplists group ids, not user ids. If you’re on a system where each user is given their own group (user1:user1), this is ok, otherwise create a new group and put both users in it.In any case you’ll also need to make sure that the
authorized_keysfile belongs to the group in question (usechownif necessary), that it is group-writable (chmod g+w authorized_keys), and that user2 has execute permission for all the directories on the path leading toauthorized_keys.PS. When you’re done, it is possible that your ssh might decide the file is unsafe and refuse to read it. In that case your work will be in vain, but you can always set up a setuid program to edit the file.