A question regarding file transfer loggin in OpenSSH

Iain Morgan imorgan at nas.nasa.gov
Fri May 28 02:50:27 EST 2010


On Thu, May 27, 2010 at 10:46:17 -0500, Jose C. Valles Martinez wrote:
> Hi all,
> 
>  
> 
> We are using ssh for file transfer through SCP and SFTP in a FreeBSD box,
> and it works fine as expected. But from some days ago the customers are
> requesting the logs of the transmissions, and we?ve just realized that the
> sshd daemon doesn?t log the files copied to our server nor the downloaded
> files.
> 
>  
> 
> I?ve tried with all the debug levels of the sshd daemon, but nothing. It
> logs a lot of messages in /var/log/ssh.log, but it doesn?t log the file
> transfers.
> 
>  
> 
> Could you please help us for logging these file transfers?
> 
>  

Both the SCP and SFTP protocols are layered on top of the SSH protocol
and are normally handled by external programs. Thus adjusting the log
level for the server does not have any bearing on logging file
transfers. If you search through the list archive you will probably find
several third-party patches that add logging to either scp or
sftp-server.

I should note that recent versions of OpenSSH support a -l option for
sftp-server which might meet your needs. I haven't played around with it
myself, but it might meet your needs.

-- 
Iain Morgan


More information about the openssh-unix-dev mailing list