I already have SSH
password set into KWallet
and that works to auto add SSH
keys to ssh-agent
when I open VSCode
(once upon login to system).
However if I open Konsole
(the terminal) then the ssh key is not auto added, that is, the wallet isn’t used and instead I’m asked in the terminal to input password.
Reason the terminal asks me for the passoword is because I’ve added the following code into my .bashrc
file:
# SSH Agent should be running, once
RunCount=$(ps -ef | grep "ssh-agent" | grep -v "grep" | wc -l)
if [ $RunCount -eq 0 ]; then
echo Starting SSH Agent
eval $(ssh-agent -s)
fi
# Add SSH keys to SSH agent
ssh-add -l &>/dev/null
if ! [ "$?" == 0 ]; then
echo Adding SSH key...
ssh-add ~/.ssh/GitHub-SSH
fi
Problem with this setup is that I first need to open VSCode
to for the SSH keys to be added, and only then the terminal won’t ask me for the password.
So it appears KWallet is used only for GUI programs.
The question is, how do I tell the terminal to use KWallet when opened?
I suppose there are some command line options for KWallet that are suitable for .bashrc
?
Using Debian 12 bookworm