Analytic

Monday, May 10, 2010

Chrooted SSH/SFTP

with these settings, works for me in Debian Lenny:

Be sure that this line in /etc/ssh/sshd_config exists:

Subsystem sftp internal-sftp

Chroot the user to his home:

ChrootDirectory %h

The owner of home must be root (mod 755).

These lines are important, otherwise the root user could not login into system:

Match User root
ChrootDirectory /

Restart the ssh process:

/etc/init.d/ssh restart