[scponly] chroot+sftp logging

Yann Lostec lostec at hotmail.fr
Tue Jul 22 17:09:44 EDT 2008


Salut!

Here is the log for the chrooted user 'houba':

****

Jul 20 07:07:54 marsupilami sshd[10623]: Accepted password for houba from 127.0.0.1 port 36849 ssh2
Jul 20 07:07:54 marsupilami sshd[10630]: subsystem request for sftp
Jul 20 07:07:54 marsupilami scponly[10631]: chrooted binary in place, 
will chroot()
Jul 20 07:07:54 marsupilami scponly[10631]: 3 arguments in total.
Jul 20 07:07:54 marsupilami scponly[10631]: ^Iarg 0 is scponlyc
Jul 20 07:07:54 marsupilami scponly[10631]: ^Iarg 1 is -c
Jul 20 07:07:54 marsupilami scponly[10631]: ^Iarg 2 is 
/usr/lib/openssh/sftp-server -f USER -l INFO
Jul 20 07:07:54 marsupilami scponly[10631]: opened log at LOG_AUTHPRIV, 
opts 0x00000029
Jul 20 07:07:54 marsupilami scponly[10631]: retrieved home directory of 
'/home/houba//data' for user 'houba'
Jul 20 07:07:54 marsupilami scponly[10631]: chrooting to dir: 
'/home/houba'
Jul 20 07:07:54 marsupilami scponly[10631]: chdiring to dir: '/data'
Jul 20 07:07:54 marsupilami scponly[10631]: chdiring to dir: '/data'
Jul 20 07:07:54 marsupilami scponly[10631]: setting uid to 1001
Jul 20 07:07:54 marsupilami scponly[10631]: processing request: 
'/usr/lib/openssh/sftp-server -f USER -l INFO' 
Jul 20 07:07:54 marsupilami scponly[10631]: denied request: 
/usr/lib/openssh/sftp-server -f USER -l INFO (resolved to: 
/usr/lib/sftp-server -f USER -l INFO) [username: houba(1001), IP/port: 
127.0.0.1 36849 22]

****

I also attach files from straced sftp login processes.

Regards

> Date: Mon, 21 Jul 2008 08:18:58 -0700
> From: kaleb.pederson at gmail.com
> To: lostec at hotmail.fr
> Subject: Re: [scponly] chroot+sftp logging
> CC: scponly at lists.ccs.neu.edu
> 
> On Mon, Jul 21, 2008 at 4:22 AM, Yann Lostec <lostec at hotmail.fr> wrote:
> > I tried this WE to make a chrooted sftp server on a ubuntu 8.04 PC and experienced problems when I enable sftp logging.
> [... snip...]
> 
> > I suspect:
> > -A missing library, in the chroot, used for logging that is only called by the sftp server when logging is activated?
> > -scponly working with logging, but scponlyc not working? When activating debug options to scponly, it seems my call/arguments are refused (while valid) so I get a connection loss.
> 
> Please post the debug output that you got in the logs.  The logging
> information will help us know where to look for problems.
> 
> > chroot have been setup using initial chroot script from 4.6/ubuntu.
> 
> The setup scripts are known to have deficiencies and only work in
> certain cases.  If you want to remove chroot problems from the
> picture, take a look at Jailkit which is sufficiently powerful to
> correctly sutp the chroot -- however, depending on what your debug
> output from the above looks like, it might not be necessary.
> 
> > Any tips/informations to make it work is welcome!
> 
> Are you using a custom version of OpenSSH that has the Sftp Logging
> patch applied?  The Sftp logging patch only works with OpenSSH
> versions <= 4.4.  Furthermore, OpenSSH has added some of the logging
> options that were available as a part of the SFTP Logging patch to
> OpenSSH directly.  There's now a SFTP File Control patch
> (http://sftpfilecontrol.sourceforge.net) available that supersedes the
> logging patch and adds back in the missing behavior.
> 
> I hope that helps.  Let us know how it goes.
> 
> Salut
> 
> --Kaleb


_________________________________________________________________
Plus besoin de clé usb ! Stockez votre musique en ligne gratuitement !
http://www.windowslive.fr/skydrive/
-------------- next part --------------
HTML attachment scrubbed and removed
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sftp.log.8399
Type: application/octet-stream
Size: 12179 bytes
Desc: not available
Url : https://lists.ccs.neu.edu/pipermail/scponly/attachments/20080722/ca9df439/attachment-0003.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sftp.log.8398
Type: application/octet-stream
Size: 7395 bytes
Desc: not available
Url : https://lists.ccs.neu.edu/pipermail/scponly/attachments/20080722/ca9df439/attachment-0004.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sftp.log.8350
Type: application/octet-stream
Size: 3283 bytes
Desc: not available
Url : https://lists.ccs.neu.edu/pipermail/scponly/attachments/20080722/ca9df439/attachment-0005.obj 


More information about the scponly mailing list