Operating System - Linux
1752433 Members
6161 Online
108788 Solutions
New Discussion юеВ

Sftp with the chroot option

 
Victor Fridyev
Honored Contributor

Sftp with the chroot option

Hi,

I'm trying to implement sftp with chroot on RHES 5.4 64 bit machine( 2.6.18-194.el5) .
I have a working procedure on RH4.6 32 bit (2.6.9-67.0.20.ELsmp), jailkit-2.1-1.el4.rf.i386.rpm, which has been built by S. Protter some years ago http://forums13.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1274884868657+28353475&threadId=1119613 .
The procedure has been copied to RH5 machine with jailkit-2.5-1.el5.rf.x86_64.rpm, but it does not work: when one tries to do "sftp username@localhost" , the answer is "Connection closed" and not anticipated sftp prompt.
An attempt to use another approach, with restricted ssh: http://articles.techrepublic.com.com/5100-10878_11-6181828.html?tag=nl.e011 , gave the same result. But implementation of the same rssh procedure on RH4 machine works excellent.
Conclusion: Both jailkit and rssh don't work on RH5 and do work on RH4.

Did anybody try to build sftp with chroot on RH5 using jailkit or rssh ? I mean: did anybody succeed ?

TIA
Entities are not to be multiplied beyond necessity - RTFM
3 REPLIES 3
Ivan Ferreira
Honored Contributor

Re: Sftp with the chroot option

Please see my post here:

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1364984
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Steven E. Protter
Exalted Contributor

Re: Sftp with the chroot option

Shalom all,

Ivan: It's not apparent to me which of your posts in your thread you are recommending.

Victor,

1)Any message in /var/log/messages corresponding with the "Connection Closed" statement.

2)The choot add user script we wrote for the gate servers should be walked through and check that every directory and file in the user configuration has correct ownership and permissions. As I recall jailkit is very sensitive to the most minute discrepancy there.

3) Maybe a slightly earlier version of jailkit. There were several choices available when I did this and it may have taken more than one version to work.

Hope you are well.

Enjoying the allergy season here in Maumee Ohio.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Victor Fridyev
Honored Contributor

Re: Sftp with the chroot option

Thanks guys,

I don't want ( on this stage ) to install new Open SSH and this, as far as I understand is the main condition for chroot/sftp to work.
Investigations go on.
Entities are not to be multiplied beyond necessity - RTFM