我试图将 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)