kde ksshaskpass ssh-agent plasma
Kubuntu 20.04 LTS
0. keys.
put keys in $HOME/key folder (optional)make sure private key files permission is 400 or 600. (required), and file extension is ".key".
1. install ksshaskpass (mine is installed)
$ sudo apt install ksshaskpass2. add keys
$HOME/.config/autostart-scripts/load-keys.sh file content:
#!/bin/bash
export SSH_ASKPASS=/usr/bin/ksshaskpassSSH_ASKPASS=/usr/bin/ksshaskpass ssh-add ~/key/*.key </dev/null
Run this script manually once. It will ask for password if key file is password-protected, and it can save the password in kwallet so you won't need to input it again.
3. make load-keys.sh executable
$ chmod +x $HOME/.config/autostart-scripts/load-keys.sh4. load ssh-agent (not required on mine) (make it executable too)
$ cat ~/.config/plasma-workspace/env/ssh-agent-startup.sh#!/bin/bash
[ -n "$SSH_AGENT_PID" ] || eval "$(ssh-agent -s)"
Reference
https://newbedev.com/using-ssh-agent-with-kde
https://dev.to/manekenpix/kde-plasma-ssh-keys-111e
https://askubuntu.com/questions/393653/using-ssh-with-wallet-on-kde
Comments
Post a Comment