Chrooted SFTP in Jail

Hello! :)
I'm tying to up chrooted SFTP-server in jail. My FreeBSD version:
Code:
uname -a
FreeBSD jail1.jail 9.1-RELEASE FreeBSD 9.1-RELEASE #3: Wed Oct  9 21:21:57 EEST 2013     root@server.home:/usr/src/sys/amd64/compile/SERVER  amd64
SSH-version:
Code:
ssh -v
OpenSSH_5.8p2 FreeBSD-20110503, OpenSSL 0.9.8x 10 May 2012
...
I'm trying to use next ssh_config:
Code:
Protocol 2
Subsystem sftp internal-sftp
Match User fileuser
ChrootDirectory %h
ForceCommand internal-sftp
But, during connection I have:
Code:
sftp fileuser@192.168.1.200
/etc/ssh/ssh_config: line 51: Bad configuration option: Subsystem
/etc/ssh/ssh_config: line 52: Bad configuration option: Match
/etc/ssh/ssh_config: line 53: Bad configuration option: ChrootDirectory
/etc/ssh/ssh_config: line 54: Bad configuration option: ForceCommand
/etc/ssh/ssh_config: terminating, 4 bad configuration options
Connection closed
Please, help me :)
 
My version of SSH is 5.8. So I can't understand in what my problem is. That commands (Match, ChrootDirectory, ForceCommand, etc.) exist begining from version OpenSSH 4.4
 
There's a difference between /etc/ssh/sshd_config and /etc/ssh/ssh_config. Once is for server side and one is for client side connections. It looks like you put your changes in the wrong file.
 
Back
Top