免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 12254 | 回复: 2
打印 上一主题 下一主题

[系统安全] SFTP对文件进行了上传下载操作,系统如何配置日志记录 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-12-23 14:10 |只看该作者 |倒序浏览
各位大虾!有两个问题请教?
一、SSH的SFTP是否可以配置上传、下载的日志,小弟查了好多资料目前只能配置成登陆用户,IP,日志,配置不出对文件操作的日志,如果有大神知道如何配置的,请告知一下如何配置。

二、第一种方案搞不定,只能问第二种了,由于目的是想知道用户利用远程SFTP对服务器上的文件进行了操作记录日志,请教LINUX是否可以有其他办法知道对文件进行了读写操作记录,或者是写个脚本可以实现,请各位大神各抒己见,有劳了。

论坛徽章:
0
2 [报告]
发表于 2013-12-26 14:26 |只看该作者
本帖最后由 sgm277 于 2013-12-26 14:27 编辑

man 8 sftp-server

SFTP-SERVER(            BSD System Manager's Manual           SFTP-SERVER(

NAME
     sftp-server - SFTP server subsystem

SYNOPSIS
     sftp-server [-f log_facility] [-l log_level] [-u umask]

DESCRIPTION
     sftp-server is a program that speaks the server side of SFTP protocol to stdout and expects client requests from stdin.  sftp-server is not intended to be
     called directly, but from sshd( using the Subsystem option.

     Command-line flags to sftp-server should be specified in the Subsystem declaration.  See sshd_config(5) for more information.

     Valid options are:

     -f log_facility
             Specifies the facility code that is used when logging messages from sftp-server.  The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1,
             LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.  The default is AUTH.

     -l log_level
             Specifies which messages will be logged by sftp-server.  The possible values are: QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and
             DEBUG3.  INFO and VERBOSE log transactions that sftp-server performs on behalf of the client.  DEBUG and DEBUG1 are equivalent.  DEBUG2 and DEBUG3
             each specify higher levels of debugging output.  The default is ERROR.

     -u umask
             Sets an explicit umask(2) to be applied to newly-created files and directories, instead of the user's default mask.

     For logging to work, sftp-server must be able to access /dev/log.  Use of sftp-server in a chroot configuration therefore requires that syslogd( estab-
     lish a logging socket inside the chroot directory.

SEE ALSO
     sftp(1), ssh(1), sshd_config(5), sshd(

     T. Ylonen and S. Lehtinen, SSH File Transfer Protocol, draft-ietf-secsh-filexfer-00.txt, January 2001, work in progress material.

HISTORY
     sftp-server first appeared in OpenBSD 2.8.

AUTHORS
     Markus Friedl <markus@openbsd.org>

BSD                            December 26, 2013                           BSD

DEBUG日志你试了没有,应该能打印出来你要的信息吧?

论坛徽章:
0
3 [报告]
发表于 2016-08-16 11:14 |只看该作者
楼主你好!不知道你配置sftp记录上传下载,配置好没有?
可不可以教我一下,谢谢!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP