Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSH: enable ssh agent #118

Open
petRUShka opened this issue Jun 23, 2024 · 1 comment
Open

SSH: enable ssh agent #118

petRUShka opened this issue Jun 23, 2024 · 1 comment

Comments

@petRUShka
Copy link
Contributor

Arch wiki in section Start ssh-agent with systemd user proposes:

If you would like your ssh agent to run when you are logged in, regardless of whether X is running, a handy ssh-agent.service is included in openssh since the version 9.4p1-3, which can be enabled as a user unit.

So maybe it is useful to add something like this in ssh role:

- name: Enable ssh-agent service
  service:
    name: ssh-agent.service
    enabled: yes
    state: started
    scope: user
  become: yes
  become_user: "{{ user.name }}"
  environment:
    XDG_RUNTIME_DIR: "/run/user/{{ user.uid }}"
@pigmonkey
Copy link
Owner

I use GPG agent for my SSH, so I'm not interested in this. For people who do use SSH agent, I think launching it from one's shell config is still common. I'm not sure that there is an appeal to outsourcing that to systemd. But I'd accept a pull request for this as long as it depended on a variable that was disabled by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants