Last active
May 17, 2022 16:43
-
-
Save x-drum/9bbf886a468dd6a06482878952ad4407 to your computer and use it in GitHub Desktop.
ssh-agent: Archlinux plasma 5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
## place in ~/.config/plasma-workspace/shutdown/ssh-agent-shutdown.sh | |
## exec order: "kde shutdown" | |
$SSH_AGENT_PID" ] || eval "$(ssh-agent -k)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
## place in ~/.config/plasma-workspace/env/ssh-agent-sshadd.sh | |
ssh-add </dev/null | |
## uncomment if you intend to add multiple ssh keys | |
# ssh-add $HOME/.ssh/key1 $HOME/.ssh/key2 $HOME/.ssh/key3 </dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
## place in ~/.config/plasma-workspace/env/ssh-agent-startup.sh | |
## exec order: "kde pre-startup" | |
export SSH_ASKPASS="/usr/bin/ksshaskpass" | |
if ! pgrep -u $USER ssh-agent > /dev/null; then | |
ssh-agent > ~/.ssh-agent-thing | |
fi | |
if [[ "$SSH_AGENT_PID" == "" ]]; then | |
eval $(<~/.ssh-agent-thing) | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment