SSH public key authentication: Difference between revisions

Adding defining and using the ssh-agent
Tags: Mobile edit Mobile web edit
m typo
Line 42: Line 42:
</syntaxhighlight>
</syntaxhighlight>


NixOS will starta user systemd service with the ssh-agent at login. You can see the service with the command <code>systemctl --user status ssh-agent</code>.
NixOS will start a user systemd service with the ssh-agent at login. You can see the service with the command <code>systemctl --user status ssh-agent</code>.


It provides also the environment variable $SSH_AUTH_SOCK which refers to <code>/run/user/1000/ssh-agent</code> , in this case for user id 1000.
It provides also the environment variable $SSH_AUTH_SOCK which refers to <code>/run/user/1000/ssh-agent</code> , in this case for user id 1000.