Add ssh-agent service and ssh config
Add a systemd user service to start the ssh-agent and add an ssh config to automatically add ssh identities to the agent when they are used (otherwise we have to add them manually). I will see how this works out. See: https://wiki.archlinux.org/title/SSH_keys#SSH_agents
This commit is contained in:
parent
afa622369b
commit
f1b55c6be9
@ -63,6 +63,12 @@ dotfiles:
|
|||||||
d_local_bin:
|
d_local_bin:
|
||||||
src: local/bin
|
src: local/bin
|
||||||
dst: ~/.local/bin
|
dst: ~/.local/bin
|
||||||
|
f_ssh_config:
|
||||||
|
src: ssh/config
|
||||||
|
dst: ~/.ssh/config
|
||||||
|
f_ssh-agent.service:
|
||||||
|
src: config/systemd/user/ssh-agent.service
|
||||||
|
dst: ~/.config/systemd/user/ssh-agent.service
|
||||||
profiles:
|
profiles:
|
||||||
everywhere:
|
everywhere:
|
||||||
dotfiles:
|
dotfiles:
|
||||||
@ -90,6 +96,7 @@ profiles:
|
|||||||
- f_pam_environment
|
- f_pam_environment
|
||||||
- f_xdg_desktop_portal_wlr_config
|
- f_xdg_desktop_portal_wlr_config
|
||||||
- d_local_bin
|
- d_local_bin
|
||||||
|
- f_ssh-agent.service
|
||||||
knafeh:
|
knafeh:
|
||||||
dotfiles:
|
dotfiles:
|
||||||
- d_vim
|
- d_vim
|
||||||
@ -111,3 +118,4 @@ profiles:
|
|||||||
- f_xdg_desktop_portal_wlr_config
|
- f_xdg_desktop_portal_wlr_config
|
||||||
- f_geoclue-agent.service
|
- f_geoclue-agent.service
|
||||||
- d_local_bin
|
- d_local_bin
|
||||||
|
- f_ssh-agent.service
|
||||||
|
13
dotfiles/config/systemd/user/ssh-agent.service
Normal file
13
dotfiles/config/systemd/user/ssh-agent.service
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# From: https://wiki.archlinux.org/title/SSH_keys#SSH_agents
|
||||||
|
[Unit]
|
||||||
|
Description=SSH key agent
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
|
||||||
|
# DISPLAY required for ssh-askpass to work
|
||||||
|
Environment=DISPLAY=:0
|
||||||
|
ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
1
dotfiles/ssh/config
Normal file
1
dotfiles/ssh/config
Normal file
@ -0,0 +1 @@
|
|||||||
|
AddKeysToAgent yes
|
Loading…
Reference in New Issue
Block a user