Directive 'ChrootDirectory' is not allowed with new OpenSSH

0

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.

Nick

Posted 2013-09-09T06:43:43.637

Reputation: 101

Answers

0

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.

Nick

Posted 2013-09-09T06:43:43.637

Reputation: 101