相关疑难解决方法(0)

如何在 Ubuntu 16.4 LTS 中更改 sshd 的日志文件?

我试图将 sshd 日志定向到 /var/log.auth.log 但它转到 /var/log/secure 我当前的日志sshd转到/var/log/secure,并且我想将其分开以sshd用于不同的日志(例如,/var/log/sshd.log)所以跟踪登录和注销我的系统会更容易。我正在使用 Ubuntu 16.4 LTS。

cat /etc/ssh/sshd_config
# Package generated configuration file
# See the sshd_config(5) manpage for details

# What ports, IPs and protocols we listen for
Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
#Privilege Separation is turned on …
Run Code Online (Sandbox Code Playgroud)

ubuntu syslog sshd

5
推荐指数
0
解决办法
2302
查看次数

有没有一种简单的方法来检查哪个程序写入/var/log/messages?

有没有一种简单的方法来检查哪个程序写入了哪个文件?例如,我想检查哪个程序向 /var/log/messages 写入了错误。

centos

3
推荐指数
1
解决办法
9681
查看次数

标签 统计

centos ×1

sshd ×1

syslog ×1

ubuntu ×1