I'm learning linux, and enjoying all the debugging and head scratching that comes with using it in the broad, general purpose way that I do at work currently. Finally feeling like I'm ready to start understanding and stop parroting - like maybe I finally know enough to start learning.
...Then there's shit like this, that knocks me right back to zero. Here's my problem: I am attempting to set up SFTP for chrooted users, and use SSH public key authentication. SFTP is already set up and working with password auth- but some of my clients (rightfully) want to use public key auth.
In this example I'll be working with the dummy user "globocorp" who's a member of "sftpusers". This user is chrooted to /sftp/globocorp, and my sshd_config is set up to disallow password auth for this user, and allow only pubkey. (debug output from sshd -v indicates this is happening as expected).
I have placed my public key in the location specified in my sshd_config: /sftp/globocorp/sftpdirectory/.ssh/authorized_keys
When the remote user attempts to connect to the server via commandline SFTP, this message is logged on the server side: "Could not open authorized keys '/sftpdirectory/globocorp/.ssh/authorized_keys': Permission denied "
I've checked and double checked my permissions, and that they are set as defined by the CentOS/RHEL setup guides. (700 on the home directory, 700 on .ssh directory, and 600 on the authorized_keys file).
I'm not looking for a one-liner answer to this problem- I'm hoping somebody with more experience can walk me through how they would debug this problem and figure out where exactly my screw-up is.
Let me hear your thought-process on this!
[link][5 comments]