Skip to content

Instantly share code, notes, and snippets.

@414n
Forked from iiska/Autostart.sh
Last active March 15, 2022 10:10
Show Gist options
  • Select an option

  • Save 414n/08556399b112f6b931a3fd82e7a6d775 to your computer and use it in GitHub Desktop.

Select an option

Save 414n/08556399b112f6b931a3fd82e7a6d775 to your computer and use it in GitHub Desktop.
Using KWallet and ksshaskpass with ssh-agent (KDE 5)
#!/bin/sh
# Put this in .config/plasma-workspace/env/ssh-agent.sh
eval $(ssh-agent)
#!/bin/sh
# Put this in .config/plasma-workspace/shutdown/ssh-agent.sh
ssh-agent -k
# Put this in ~/.config/autostart/ssh-add.desktop
[Desktop Entry]
# Add additional keys to load after -q, like ~/.ssh/my_key
Exec=env SSH_ASKPASS=/usr/bin/ksshaskpass /usr/bin/ssh-add -q
Name=ssh-add
Type=Application
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment