2

I freshly installed Kubuntu 19.04 but I used my old home folder from Linux Mint. .bashrc and .profile are Kubuntu versions.

When using ssh, I everytime need to type my pass phrase. I can manually ssh-add my key but after a boot, I still need to enter my passphrase again. That's annoying.

ssh-agent seems to be running at the time I try to connect.

What could cause this?

1
  • this is true for kubuntu 20.04 too – Yuvaraj Oct 22 '20 at 15:03
3

KDE seems not to start ssh-agent automatically. To solve this, install ksshaskpass and

nano ~/.config/autostart-scripts/ssh-add.sh

Enter the following:

#!/bin/sh
export SSH_ASKPASS=/usr/bin/ksshaskpass
/usr/bin/ssh-add $HOME/.ssh/id_rsa </dev/null

Check if the path is correct with whereis ksshaskpass If you have multiple keys just separate them with a space.

Make the script executable chmod u+x ~/.config/autostart-scripts/ssh-add.sh

Test it sh ~/.config/autostart-scripts/ssh-add.sh

After a log-off and in again you will be prompted for a passphrase and this time it will be stored.

1
  • How to add all keys automatically as we create one ? @Corni – Yuvaraj Oct 23 '20 at 6:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.