I'm trying to add a public key to a jailkit shell user so they can login without entering a password. Adding the key to a /home/username/.ssh directory doesn't seem to work. Is this possible? If so, how can I set it up? Thanks!
I've upgraded to 3.0.4.1, so I now have the "SSH-RSA Public Key" field for the shell user. I add the pub key like so: Code: ssh-rsa AAAABBBB....ZZZZ= After saving, it still doesn't work. I get prompted for the password after connecting. Code: ssh [email protected] [email protected]'s password: I've verified that both of these were created, but as root user and group: Code: /var/www/clients/client123/web123/home/shellusername/authorized_keys /var/www/clients/client123/web123/.ssh/authorized_keys The above key is in the authorized_keys files as one line. Should the user and group be root?
The permissions are wrong, the .ssh folder and its content should be owned by the ssh user and client group. This problem has been fixed in the latest RC: http://www.howtoforge.com/forums/showthread.php?t=55647
I just upgraded to the RC1 you linked to. Still no luck. It did create the directory and files with the correct user and group this time, but it's still prompting for the password. Do I need to set the user to "--disabled-password" or enable "RSAAuthentication yes" in ssh_config? I'm coming from a pretty much stock http://www.howtoforge.com/perfect-server-ubuntu-10.04-lucid-lynx-ispconfig-3 Thanks for the help.
I've got it working now. I had set the folder to: Code: chmod -R g+w shelluserdir I want to allow another user to have access to that folder, but I guess this breaks the ssh login via key. Is there a Jailkit setting to allow this? I had to turn on to be able to even log in via ssh with a password after making the above change: /etc/jailkit/jk_chrootsh.ini Code: [shelluser] relax_home_group_permissions=1
This looks like it works. Change it back to no group write: Code: chmod -R g-w shelluserdir Then set a sub-directory to group write: Code: chmod -R g+w shelluserdir/sub-dir That allows my other use to access and write files. They just cannot save in the root of the home directory which is fine.