Created
September 17, 2019 19:55
-
-
Save rodrigogs/769292fd199fdc7a3d009c2c4afbf253 to your computer and use it in GitHub Desktop.
Setup the KDE environment to automatically initialize the ssh agent and load the keys from .ssh.
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 | |
sudo apt install ksshaskpass -y | |
ssh_keys=$(find "${HOME}/.ssh" -type f ! -name "*.*" | tr '\n' ' ') | |
ssh_unlock_script_path="${HOME}/.config/autostart-scripts/ssh-unlock.sh" | |
rm -rf "${ssh_unlock_script_path}" | |
echo "#!/bin/bash | |
SSH_ASKPASS=/usr/bin/ksshaskpass ssh-add ${ssh_keys} </dev/null | |
" >> "${ssh_unlock_script_path}" | |
chmod +x "${ssh_unlock_script_path}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment