Hi, I was just doing some chrooted sftp work and I've thought it would be nice if sshd_config's 'ChrootDirectory' and sftp-server '-d - start directory' would support more sofisticated token format like smtpd.conf states.
I could imagine following would be useful for sftp hosting providers: Match Group sftp X11Forwarding no AllowTcpForwarding no PermitTTY no ForceCommand internal-sftp -d %u ChrootDirectory /home/sftp/%{u[0]}/%u ChrootDirectory would for user 'foo' expand to: /home/sftp/f/foo and a sftp user would be switched to: /home/sftp/f/foo/foo This way a hosting provider could easier define more sofisticated sftp homedirs. Sorry, I'm not able to provide diffs :( jirib