LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-27-2012, 03:33 PM   #1
GlowingApple
LQ Newbie
 
Registered: Mar 2008
Posts: 9

Rep: Reputation: 0
Can't get SFTP logging to work


I'm running an SFTP server (openssh). I want to turn on SFTP logging to troubleshoot some issues. From the sftp-server man page, adding "-l INFO" should provide this:

Quote:
INFO and VERBOSE log transactions that sftp-server performs on behalf of the client.
So I changed my /etc/ssh/sshd_config to read:

Code:
Subsystem       sftp    /usr/libexec/openssh/sftp-server -l INFO -f AUTH
and restarted sshd, but I still see "subsystem request for sftp" as the sole log entry when connecting/cd/get/mget with SFTP. I also tried "-l VERBOSE", but no change.

I have not set up a chroot for SFTP, and I doubt it would be the default for CentOS, so I'm not sure what I'm missing. Any ideas?
 
Old 02-28-2012, 06:06 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Were you looking in /var/log/messages? .. it could depend on your syslog config, try using this instead:
Code:
Subsystem       sftp    /usr/libexec/openssh/sftp-server -l INFO -e
.. it will dump the logs onto the console instead of into syslog.
 
Old 03-01-2012, 05:32 PM   #3
GlowingApple
LQ Newbie
 
Registered: Mar 2008
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks for the response. I had tried that as well, but saw nothing on the console either. I ended up discovering the problem when I tried logging in as a user that normally doesn't use SFTP. I had set the shell for all "SFTP only" users to "/usr/libexec/openssh/sftp-server", and it appears that the options added to the sshd_config file weren't being read. I changed to internal-sftp (with the logging options) in sshd_config and logging is working now.

Thanks for your response though; sorry for not posting a "never mind, figured it out" response sooner!
 
  


Reply

Tags
centos, logging, sftp



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Chroot Jail + SFTP Logging on RHEL / CentOS6 - Logs Not Occuring NDarkstar Red Hat 8 09-07-2013 12:15 AM
I'm defeated: Can't get SCP to work in chroot jail (but sftp and ssh work fine) ponga Linux - Security 2 09-30-2011 11:06 AM
Chrooted OpenSSH SFTP server logging issue Sea-you Linux - Server 2 08-03-2011 09:09 PM
internal-sftp logging sshd blither Linux - Server 4 01-12-2011 07:19 PM
SSH / SFTP session logging phatgeezer Linux - Security 2 05-07-2007 10:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration