Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to set up chrooted SFTP access but OpenSSH is giving this error:

/etc/ssh/sshd_config: line 94: Bad configuration option: ChrootDirectory
/etc/ssh/sshd_config line 94: Directive 'ChrootDirectory' is not allowed within a Match block

I've seen that this is a problem with a OpenSSH version under 4.9. But my version seems to be OpenSSH_6.1p1 Debian-4, OpenSSL 1.0.1c 10 May 2012 on Ubuntu 13.04.

The relevant portion of my sshd_config file is below:

Subsystem     sftp   internal-sftp

Match group nossh
ChrootDirectory %h
ForceCommand internal-sftp
AllowTcpForwarding no

I can't figure this one out. Even the man page says it should work fine.

share|improve this question

1 Answer 1

Reinstalling OpenSSH-server seems to have fixed this which is bizzare. This is on an official Ubuntu EC2 image so it would be odd for the sshd binary to not be the same as the the one in the repositories.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.