Why ssh-agent group ownership is not root

Ask and Learn

Trying to understand why ssh-agent has sgid bit and found this post ssh-agent has sgid

I have another question, why the group ownership of ssh-agent is nobody not root? What is the reason behind it? Will it still work if group ownership is root?

Michael Homer

If it were setgid root then the agent would run as group root, which likely has broader permissions than the user it started as. That could be a security risk; at the least, running something as root unnecessarily is a red flag (even the group) and requires extra attentiveness.

Setting the group ownership to nobody, which is a group that shouldn't have any meaningful permissions or files attached, means that ssh-agent doesn't get any more rights than the user started with. As the linked question says, the reason it's setgid in the first place is to prevent ptracing the program, rather than because it actually needs different permissions. In the discussion thread linked from the other question, one of the developers notes:

it would seem that the group is of no consequence. It's the fact that the binary is setgid anygroup that's important.

nobody is a handy group to use when you only want a side effect of setgid, not the behaviour itself.

I imagine it would still work with setgid root. I just tried that here, and it didn't complain at all and seemed to work in cursory testing. That said, I can't think of any actual reason to change it to that - everyone seems to be better off with it running as group nobody than group root.

I don't suggest changing the permissions of files installed by your package manager, in any case, because they tend to get upset about any modifications to the files they control.

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

Why is ssh-agent running? Should it be?

분류에서Dev

Why does ssh look for keys in /root/.ssh when run with sudo?

분류에서Dev

What is the difference between the group root and the group sudo? Why root user by default is not a member of the group sudo?

분류에서Dev

Change ownership of a large group of files

분류에서Dev

Changing Ownership: "Operation not permitted" - even as root!

분류에서Dev

Problem overriding ACL for default group ownership

분류에서Dev

Set Up SSH Agent for git

분류에서Dev

Changed ownership of all files and folder in home to 'root' by mistake

분류에서Dev

Can't SSH in as root

분류에서Dev

SSH: Shrinking root partition

분류에서Dev

ssh-agent 대신 gpg-agent

분류에서Dev

Extra configuration required for ssh-agent forwarding?

분류에서Dev

How to start GnuPG SSH Agent for gvfs?

분류에서Dev

PHP, SSH 및 ssh-agent 통합

분류에서Dev

Keychain ssh-agent overriding specified SSH key

분류에서Dev

Ubuntu 16.04 ssh-add without ssh-agent?

분류에서Dev

SSH password script using root

분류에서Dev

Why unprivileged user can't change file ownership?

분류에서Dev

Why am I loosing permissions/ownership on old windows folders?

분류에서Dev

Creating Volume Group on Root Partition

분류에서Dev

ssh-agent not getting set up (SSH_AUTH_SOCK, SSH_AGENT_PID env vars not set)

분류에서Dev

Doing an ssh-add upon ssh/slogin if key is not in ssh-agent?

분류에서Dev

Identify SSH public key on remote end's shell session (no agent or no identities in agent)

분류에서Dev

使用gpg-agent和SSH进行Pinentry失败

분류에서Dev

gpg-agent 및 SSH에서 Pinentry 실패

분류에서Dev

Server gets killed due to increasing number of ssh-agent processes

분류에서Dev

Vagrant VM에 대한 ssh-agent 전달

분류에서Dev

gpg-agent 및 SSH에서 Pinentry 실패

분류에서Dev

Can't run git commands using SSH agent forwarding

Related 관련 기사

  1. 1

    Why is ssh-agent running? Should it be?

  2. 2

    Why does ssh look for keys in /root/.ssh when run with sudo?

  3. 3

    What is the difference between the group root and the group sudo? Why root user by default is not a member of the group sudo?

  4. 4

    Change ownership of a large group of files

  5. 5

    Changing Ownership: "Operation not permitted" - even as root!

  6. 6

    Problem overriding ACL for default group ownership

  7. 7

    Set Up SSH Agent for git

  8. 8

    Changed ownership of all files and folder in home to 'root' by mistake

  9. 9

    Can't SSH in as root

  10. 10

    SSH: Shrinking root partition

  11. 11

    ssh-agent 대신 gpg-agent

  12. 12

    Extra configuration required for ssh-agent forwarding?

  13. 13

    How to start GnuPG SSH Agent for gvfs?

  14. 14

    PHP, SSH 및 ssh-agent 통합

  15. 15

    Keychain ssh-agent overriding specified SSH key

  16. 16

    Ubuntu 16.04 ssh-add without ssh-agent?

  17. 17

    SSH password script using root

  18. 18

    Why unprivileged user can't change file ownership?

  19. 19

    Why am I loosing permissions/ownership on old windows folders?

  20. 20

    Creating Volume Group on Root Partition

  21. 21

    ssh-agent not getting set up (SSH_AUTH_SOCK, SSH_AGENT_PID env vars not set)

  22. 22

    Doing an ssh-add upon ssh/slogin if key is not in ssh-agent?

  23. 23

    Identify SSH public key on remote end's shell session (no agent or no identities in agent)

  24. 24

    使用gpg-agent和SSH进行Pinentry失败

  25. 25

    gpg-agent 및 SSH에서 Pinentry 실패

  26. 26

    Server gets killed due to increasing number of ssh-agent processes

  27. 27

    Vagrant VM에 대한 ssh-agent 전달

  28. 28

    gpg-agent 및 SSH에서 Pinentry 실패

  29. 29

    Can't run git commands using SSH agent forwarding

뜨겁다태그

보관