3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

sftpで書き込まれたファイルのログを残す

Last updated at Posted at 2015-10-23

参考

設定

/etc/ssh/sshd_config
- Subsystem sftp /usr/lib/openssh/sftp-server
+ Subsystem sftp /usr/lib/openssh/sftp-server -l INFO
/var/log/auth.log(ubuntuの場合)
Oct 23 08:45:46 srv1 sftp-server[6335]: open "/home/user1/a.zip" flags WRITE,CREATE,TRUNCATE mode 0644
Oct 23 08:45:46 srv1 sftp-server[6335]: close "/home/user1/a.zip" bytes read 0 written 221086
  • なお、scpはログに残らない。
  • ubuntuの場合 /var/log/authlog に記録される。
  • centosの場合 /var/log/messages に記録される。

日本語対応

  • にほんご.txt\343\201\253\343\201\273\343\202\223\343\201\224.txtと記録されるので残念なところ。
  • syslog-ngに変えても改善せず。
3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?