trevorhanning
June 22nd, 2013, 07:00 PM
My server has multiple users, and I am the administrator. I began to notice problems while connecting via SSH w/ RSA keys. If I was logged into the server already (via a different window), the RSA key would be accepted. If I was not logged in already, the key would be rejected. As it turns out, this has to do with permissions on my /home/me/.ssh directory and my ~/.ssh/authorized_keys file. What boggles my mind is that when I'm logged in, the permissions are set up perfectly. When I log out, my home directory permissions switch (mysteriously, and automatically) to 700. I verified this by logging in as another user and running ls -al /home while logging in/out as myself from another window
When I am logged out, the home directory permissions look like this:
drwxr-xr-x 3 root root 4096 Jun 20 22:29 .ecryptfs
drwx------ 6 trevor trevor 4096 Jun 21 23:11 trevor
However, when I am logged in (whether it be on the machine itself, or via SSH), the permissions on my home directory mysteriously change to:
drwxr-xr-x 3 root root 4096 Jun 20 22:29 .ecryptfs
drwxr-xr-x 6 trevor trevor 4096 Jun 21 23:11 trevor
HOW DOES THIS HAPPEN??!! *totally befuddled*
When I am logged out, the home directory permissions look like this:
drwxr-xr-x 3 root root 4096 Jun 20 22:29 .ecryptfs
drwx------ 6 trevor trevor 4096 Jun 21 23:11 trevor
However, when I am logged in (whether it be on the machine itself, or via SSH), the permissions on my home directory mysteriously change to:
drwxr-xr-x 3 root root 4096 Jun 20 22:29 .ecryptfs
drwxr-xr-x 6 trevor trevor 4096 Jun 21 23:11 trevor
HOW DOES THIS HAPPEN??!! *totally befuddled*