Is there any method, with ChrootDirectory and internal-sftp, to automatically cd to a subdir on login?

Whit Blauvelt whit at transpect.com
Fri May 11 09:10:58 EST 2012


Hi,

This is either a query or a feature request. I have a system where sftp
users are chrooted using scponly, which while requiring much more setup than
OpenSSH's internal-sftp method, has the useful feature of allowing an
initial chroot to a subdirectory, typically the one used for file exchange.
I've searched for a way to do the same thing with OpenSSH. So far haven't
found it.

If there is a way, then I can transparently substitute it. Otherwise users
would have to do the cd themselves. That's not trivial in my case since a
number of the users run scripts which assume that they'll simply drop in
their correct directory on login.

Thanks for any advice, or consideration of this as a future feature if
there's no present method to achieve it.

Whit



More information about the openssh-unix-dev mailing list