为什么通过 SSH 连接时所有用户都是 uid=0?

为什么通过 SSH 连接时所有用户都是 uid=0?

我正在测试一些 pam 规则,我注意到所有用户通过 SSH 登录系统时都有 uid=0(root)。这可能是服务器启动时 sshd 自动启动的原因吗?如何避免这种情况?

Dec 13 08:41:56 dc01 sshd[4293]: Accepted keyboard-interactive/pam for rmartinez from 192.168.10.10 port 45924 ssh2
Dec 13 08:41:56 dc01 sshd[4293]: pam_unix(sshd:session): session opened for user rmartinez by (uid=0)
Dec 13 08:46:08 dc01 sshd[4404]: Connection from 192.168.10.10 port 45934 on 192.168.10.10 port 22
Dec 13 08:46:08 dc01 sshd[4404]: Postponed keyboard-interactive for pgambarte from 192.168.10.10 port 45934 ssh2 [preauth]
Dec 13 08:46:08 dc01 sshd[4404]: Accepted keyboard-interactive/pam for pgambarte from 192.168.10.10 port 45934 ssh2
Dec 13 08:46:08 dc01 sshd[4404]: pam_unix(sshd:session): session opened for user pgambarte by (uid=0)
Dec 13 08:46:21 dc01 sshd[4457]: Connection from 192.168.10.10 port 45936 on 192.168.10.10 port 22
Dec 13 08:46:21 dc01 sshd[4457]: Postponed keyboard-interactive for rmartinez from 192.168.10.10 port 45936 ssh2 [preauth]
Dec 13 08:46:21 dc01 sshd[4457]: Accepted keyboard-interactive/pam for rmartinez from 192.168.10.10 port 45936 ssh2
Dec 13 08:46:21 dc01 sshd[4457]: pam_unix(sshd:session): session opened for user rmartinez by (uid=0)

非常感谢。问候。

相关内容