Setting up ssh-agent to access Krita repository on KDE Neon¶
Make sure you remove all explicit calls to
ssh-agentin your.bashrcand.bash_profilefiles.Disable ssh support in the GPG Agent service:
Comment out line enable-ssh-support in ~/.gnupg/gpg-agent.conf
Disable the ssh-related socket as well:
systemctl --user stop gpg-agent-ssh.socket systemctl --user disable gpg-agent-ssh.socket systemctl --user mask gpg-agent-ssh.socket
Create ssh-agent service.
systemctl --user edit --full ssh-agent.service
This command will show you an OS-specific template of the service file. You can modify it or just use the following example:
[Unit] Description=OpenSSH Agent Documentation=man:ssh-agent(1) Before=graphical-session-pre.target Wants=dbus.socket After=dbus.socket [Service] ExecStart=/usr/lib/openssh/agent-launch start -- -t 60m ExecStopPost=/usr/lib/openssh/agent-launch stop
If you want to modify the timeout for your SSH keys, change the
-t 60mflag.Reload the systemd daemon
systemctl --user daemon-reload
Start the service
systemctl --user start ssh-agent.service
Check if everything loaded correctly:
systemctl --user status ssh-agent.service
OpenSSH’s agent-launch uses DBus service to push variables into the user’s environment. You may need to reboot the entire system to make sure the environment variable is properly loaded. Check the content of $SSH_AUTH_SOCK in your shell and compare it with the values in the status report of the service to verify your changes.