Skip to content

Condition check in user based systemd unit causes problems #108

@BooneyNoobington

Description

@BooneyNoobington

On Debian based distros I observed the problem that the socket didn't come up. Using journalctl errors like this appear:

ssh-tpm-agent.service - ssh-tpm-agent service was skipped because of an unmet condition check

It might be because the regular ssh-agent is launched automatically on some distros.

Commenting out the respective lines in the user systemd unit solved the problem.

[Unit]
#ConditionEnvironment=!SSH_AGENT_PID
Description=ssh-tpm-agent service
Documentation=man:ssh-agent(1) man:ssh-add(1) man:ssh(1)
Requires=ssh-tpm-agent.socket

[Service]
Environment=SSH_TPM_AUTH_SOCK=%t/ssh-tpm-agent.sock
ExecStart=/home/MYNAME/.local/go/bin/ssh-tpm-agent
#PassEnvironment=SSH_AGENT_PID
SuccessExitStatus=2
Type=simple

[Install]
Also=ssh-agent.socket

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions