linux – 为什么sshd(openssh)每个连接创建两个进程?
发布时间:2020-12-13 18:52:34 所属栏目:Linux 来源:网络整理
导读:登录前: $ps -elf | grep sshd5 S root 26135 1 0 80 0 - 13115 ? 17:26 ? 00:00:00 /usr/sbin/sshd0 S test 26480 21337 0 80 0 - 4154 - 18:41 pts/27 00:00:00 grep --colour=auto sshd 登录后: $ps -elf | grep sshd5 S root 26135 1 0 80 0 - 13115 ?
登录前:
$ps -elf | grep sshd 5 S root 26135 1 0 80 0 - 13115 ? 17:26 ? 00:00:00 /usr/sbin/sshd 0 S test 26480 21337 0 80 0 - 4154 - 18:41 pts/27 00:00:00 grep --colour=auto sshd 登录后: $ps -elf | grep sshd 5 S root 26135 1 0 80 0 - 13115 ? 17:26 ? 00:00:00 /usr/sbin/sshd 4 S root 26577 26135 0 80 0 - 24204 ? 18:42 ? 00:00:00 sshd: test [priv] 5 S test 26582 26577 0 80 0 - 24204 ? 18:42 ? 00:00:00 sshd: test@pts/30 0 S test 26653 21337 0 80 0 - 4155 - 18:42 pts/27 00:00:00 grep --colour=auto sshd 这两个过程是什么? 4 S root 26577 26135 0 80 0 - 24204 ? 18:42 ? 00:00:00 sshd: test [priv] 5 S test 26582 26577 0 80 0 - 24204 ? 18:42 ? 00:00:00 sshd: test@pts/30 谢谢, 解决方法
权限分离 – 一个保留root权限以执行只有root可以执行的操作的进程,以及另一个执行其他操作的进程.
在询问此问题时,权限分离由sshd_config中的选项控制,sshd_config手册页解释了它的用途.权限分离在version 7.5中成为强制性的,因此该选项及其文档已消失.如果存在任何此类文档,我不知道在哪里可以找到特权分离功能的规范文档. 删除前的手册页项的最后一个版本说: UsePrivilegeSeparation Specifies whether sshd(8) separates privileges by creating an unprivileged child process to deal with incoming network traffic. After successful authentication,another process will be created that has the privilege of the authenticated user. The goal of privilege separation is to prevent privilege escalation by con- taining any corruption within the unprivileged processes. The argument must be yes,no,or sandbox. If UsePrivilegeSeparation is set to sandbox then the pre-authentication unprivileged process is subject to additional restrictions. The default is sandbox. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
推荐文章
站长推荐
热点阅读