登录前:
$ 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
Run Code Online (Sandbox Code Playgroud)
登录后:
$ 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
Run Code Online (Sandbox Code Playgroud)
这两个进程有什么用?
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
Run Code Online (Sandbox Code Playgroud)
谢谢,
小智 40
权限分离 - 一个进程保留 root 权限来做只有 root 才能做的事情,而另一个进程则做其他所有事情。
在提出这个问题时,权限分离是由 中的一个选项控制的sshd_config,sshd_config手册页解释了它的用途。权限分离在7.5 版中成为强制性的,因此该选项及其文档消失了。如果存在任何此类文档,我不再知道在哪里可以找到权限分离功能的规范文档。
删除前手册页项目的最后一个版本说:
UsePrivilegeSeparation– 指定 sshd(8) 是否通过创建非特权子进程来处理传入网络流量来分离特权。认证成功后,将创建另一个具有认证用户权限的进程。特权分离的目标是通过在非特权进程中包含任何损坏来防止特权升级。参数必须是yes,no, 或sandbox。如果UsePrivilegeSeparation设置为,sandbox则预认证非特权进程受到额外限制。默认值为sandbox.
| 归档时间: |
|
| 查看次数: |
9130 次 |
| 最近记录: |