Jose C. Valles Martinez
2010-May-27 15:46 UTC
A question regarding file transfer loggin in OpenSSH
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? Thanks a lot and best regards, Jose Vall?s Dept. Sistemas INTOS, S.A. 93 247 71 17 (directo) 606 987 657 (m?vil) ================================================= Advertencia legal: Esta comunicaci?n puede contener informaci?n confidencial y/o material de propiedad y por tanto es para el uso exclusivo de su destinatario. Si recibe este correo por error, por favor comun?queselo al remitente y elimine este correo y sus anexos de todos los ordenadores. En el caso de que el destinatario no consintiera la utilizaci?n del correo electr?nico, deber? ponerlo en nuestro conocimiento inmediatamente. Disclaimer: This communication may contain confidential and/or otherwise proprietary material and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. If the address of this message does not consent to the use of internet e-mail, please inform us inmmediately.
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