This quick tip was tested on openSUSE Tumbleweed. However, it will probably work for other Linux distributions running KDE Plasma.
Install ksshaskpass5
via Zypper.
sudo zypper in --details ksshaskpass5
Create the script that will run ssh-add
.
vim ~/bin/startup-scripts/ssh-add.sh
Add all the needed keys using ssh-add -q
. The “q” here stands for quiet.
|
|
Give execution permission to the script.
chmod +x ~/bin/startup-scripts/ssh-add.sh
Create the .desktop
file that will be automatically parsed at KDE Plasma start-up.
vim .config/autostart/ssh-add.desktop
|
|
Create another script in ~/.config/plasma-workspace/env/
to set the environment variable SSH_ASKPASS
to use ksshaskpass.
vim ~/.config/plasma-workspace/env/ksshaskpass.sh
|
|
In the next login, a dialogue window asking for your SSH key password will appear for each added key. Ensure to mark the option “Remember password”.