Kwallet, ssh-agent and ksshapspass

Hello,
Is there anybody who successfully configured kwallet/kwallet-magager with ksshaskpass?
I try follow: KDE Plasma & ssh keys - DEV Community but no joy....

After reboot ssh-agent isn't running. My login shell is bash:

λ grep "^$USER" /etc/passwd
emc:x:1000:1001:Michał:/home/emc:/bin/bash

but konsole is running fish:

emc@irene in ~ took 22s
λ ps
PID TTY          TIME CMD
2339 pts/0    00:00:09 fish
23695 pts/0    00:00:00 ps

I try:

λ git clone [email protected]:xwiki-labs/cryptpad.git cryptpad
Cloning into 'cryptpad'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

When I done:

eval (ssh-agent -c)
ssh-add ~/.ssh/my_first_key

Then I can clone git using ssh but not ksshaskpass popup.

Anyway I'm a bit confiuse: eval "$(ssh-agent -s)" do not work in konsole/fish but when I start it form bash, I can not ssh-add for other knosole:

ssh-add ~/.ssh/my_first_key
[🔴] × ssh-add ~/.ssh/nokia
Could not open a connection to your authentication agent.

emc@irene in ~ took 6ms
[🔴] × ps -ef | grep -i ssh
emc        17712       1  0 14:24 ?        00:00:00 ssh-agent -s

Anyway what I would like to configure to be able add ssh key to kwalllet since it is activated after login to Plasma. ANd additionally useing kssaskpass when ssh/git ask me for password for one of my key.

1 Like

I guess I would start with this. What have you tried so far to switch it to bash? Did you change it in Garuda Assistant?

AFAIK changing on Assistant changes the shell used in TTY. To modify Konsole, open Profile settings (might be in preferences) and edit the chosen/default profile to launch bash.

I got kind of working, use: GitHub - ivakyb/fish_ssh_agent: Fish-function `fish_ssh_agent` to start `ssh-agent` and export its environment variables to all fish instances: currently running and newly created.

wget https://gitlab.com/kyb/fish_ssh_agent/raw/master/functions/fish_ssh_agent.fish -P ~/.config/fish/functions/

Append fish_ssh_agent to ~/.config/fish/config.fish
So ssh-agent is up and running when start konsole

Then:

cat ~/.config/environment.d/ssh_askpass.conf
SSH_ASKPASS='/usr/bin/ksshaskpass'

And add to ~/.config/fish/config.fish:

alias add-ssh="ssh-add -q < /dev/null"

So in konsole I got agent running and add-ssh with start ksshaskpass with checkbox save checked key was added to wallet.

Not the best, but good enough... Ideally would be when I rungit clone git://.... ksshaskpass pop-up... but anyway...

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.