1

SSH public key login after copying the keys from one user to another

view story
linux-howto

http://unix.stackexchange.com – One of my users (user1) is able to connect to myserver (as user1) using SSH key authentication. The id_rsa keys are set up in /home/user1/.ssh and this works fine: the key is authorized on the server. I've created a second user on the same client machine (user2) and copied the entire .ssh directory into /home/user2/.ssh. The file permissions are identical, for both /home/user1 and /home/user2 themselves, their .ssh directories and all the files within. (Both users are in fact controlled by myself.) I've also changed the files and directories ownership from user1:user1 to user2:user2. On the (HowTos)