# Chroot SFTP Session Logging

**URL:** https://forums.suse.com/t/chroot-sftp-session-logging/23655
**Category:** SLES Configure-Administer
**Created:** [February 21, 2013, 10:01am UTC](https://forums.suse.com/t/chroot-sftp-session-logging/23655 "2013-02-21T10:01:47Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![noelpaul](https://avatars.discourse-cdn.com/v4/letter/n/7ea924/32.png) [@noelpaul](https://forums.suse.com/u/noelpaul)
#### Post date: [February 21, 2013, 10:01am UTC](https://forums.suse.com/t/chroot-sftp-session-logging/23655/1 "2013-02-21T10:01:47Z")

</div>

Hi All,

I have configured my SLES 11 SP 1 server to perform chrooted SFTP session which works fine. I’m trying get internal-sftp to log the actual sftp session. Has anyone been able to do this or can anyone point me to a doc. that contains the info.

Currently my /etc/ssh/sshd\_config looks has the following:

Subsystem sftp internal-sftp -f AUTH -l VERBOSE

Match group sftponly  
ChrootDirectory /u01/sftp-chroot/%u  
X11Forwarding no  
AllowTcpForwarding no  
ForceCommand internal-sftp -f AUTH -l VERBOSE

Thanks.

---

<div class="post-metadata">

### Author: ![noelpaul](https://avatars.discourse-cdn.com/v4/letter/n/7ea924/32.png) [@noelpaul](https://forums.suse.com/u/noelpaul)
#### Post date: [February 22, 2013, 3:49am UTC](https://forums.suse.com/t/chroot-sftp-session-logging/23655/2 "2013-02-22T03:49:29Z")

</div>

After doing a bit more research, all I had to do was create a domain socket in each chroot user directory. I am using syslog-ng for system logging:

# mkdir /u01/sftp-chroot//dev

# syslog-ng -a /u01/sftp-chroot//dev/log

Then modify /etc/syslog-ng/syslog-ng.conf to channel the sftp session logs to wherever you want.
