Results 1 to 3 of 3
Hi,
I am trying to get chroot to work with OpenSSH, but below config gives me error when restarting ssh, see errot below:
Match user djm
ForceCommand internal-sftp
ChrootDirectory /chroot
...
- 04-22-2009 #1Just Joined!
- Join Date
- Jan 2008
- Posts
- 14
chroot with OpenSSH not working RedHat 5 / CentOS 5
Hi,
I am trying to get chroot to work with OpenSSH, but below config gives me error when restarting ssh, see errot below:
Match user djm
ForceCommand internal-sftp
ChrootDirectory /chroot
My OS: CentOS release 5.3 (Final)
My SSH version:
[root@dev01 jpssh]# ssh -v
OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
[root@webhost2 jpssh]# rpm -qa | grep ssh
openssh-4.3p2-29.el5
openssh-clients-4.3p2-29.el5
openssh-server-4.3p2-29.el5
==
[root@dev01 jpssh]# /etc/init.d/sshd restart
Stopping sshd: [FAILED]
Starting sshd: /etc/ssh/sshd_config: line 14: Bad configuration option: Match
/etc/ssh/sshd_config: line 15: Bad configuration option: ForceCommand
/etc/ssh/sshd_config: line 16: Bad configuration option: ChrootDirectory
/etc/ssh/sshd_config line 124: Subsystem 'sftp' already defined.
[FAILED]
Related link: Chroot in OpenSSH
- 04-22-2009 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
From the looks of it, your SSH version doesn't support this new feature. The most current version is 5.2 and you are running 4.3. Go to OpenSSH and install the most recent version. Since these are tarballs, not rpm's, you will first need to remove the current openssh from your system with yum. FYI, I am also running CentOS 5.3, and 4.3 is the openssh version available from the CentOS/RedHat repositories, rpmforge in this case.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 04-24-2009 #3Just Joined!
- Join Date
- Jan 2008
- Posts
- 14
Many thanks.


Reply With Quote