I'm searching for a simple solution to allow access to only one
directory of an existing user (that may not login) via sftp-server and
authorized_keys file using the extended syntax

command="/usr/lib/openssh/sftp-server --root
ssh-rsa AAA...keydata

Is something like that already possible, is there a better solution?

If not, how much effort for me would it be to implement it? I've already
got the ubuntu sources and looked into the code a little bit. Is the
chroot syscall after opening the root directory sufficient to make it
work? Never programmed with chroot. Could such patch make it into the trunk?

openssh-unix-dev mailing list