Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .