PDA

View Full Version : [ubuntu] OpenSSH and SFTP


lewisforlife
February 5th, 2010, 04:59 PM
I currently have OpenSSH-Server installed on an Ubuntu 9.10 Server install. I currently have PasswordAuthentication turned off and authenticate remote connections with RSA PublicKeyAuthentication.

I want to create a user that has access to /var/www and its contents, and is chrooted in that directory. I would like this user to be able to authenticate with a password. Every other user would have to use PublicKeyAuth. Is this possible? If so how can I accomplish this?

lykwydchykyn
February 5th, 2010, 05:16 PM
Regarding authentication, I don't know exactly how to do this, but you want to look into using PAM with SSH. It's set up by default on Ubuntu, you need to edit /etc/pam.d/sshd.

For chroot, I think this can be set in /etc/security/limits.conf. You may have to enable that file in /etc/pam.d/sshd.