-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
So... we need to add this to a make file for the general system
ssh-add -l
If the agent is not running (error persists), start it:
eval "$(ssh-agent -s)"
Then retry ssh-add -l
For automatic startup on Arch with Sway, add to ~/.bashrc:
if ! pgrep -u "$USER" ssh-agent > /dev/null; then
ssh-agent -t 1h > "$XDG_RUNTIME_DIR/ssh-agent.env"
fi
if [ ! -f "$SSH_AUTH_SOCK" ]; then
source "$XDG_RUNTIME_DIR/ssh-agent.env" >/dev/null
fi
Source the file or restart shell.
Probably do this:
Alternatively, use systemd (openssh >=9.4p1-3): systemctl --user enable --now ssh-agent.service
Docs: https://wiki.archlinux.org/title/SSH_keys#SSH_agents
OK, the following is actually better:
As a part of bashrc get-deps (or something)
systemctl --user enable ssh-agent.service
Then:
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels