Setup ssh-agent in KDE in Ubuntu

Posted May 28th, 2011 in Razno and tagged , , , by Metod

I began toying around with KDE desktop since I got tired of Gnome. I wanted to try something new and shiny. Everything went great, it is highly customizable etc. Only one thing did not work. When ssh-ing to a server it did not ask me for keychain password anymore. So how to fix that?

First, if you don’t already have it installed, install ssh-askpass:

sudo apt-get install ssh-askpass

Ok, now that that is installed, we must ensure that it asks us for password everytime we log on. For KDE we have to create a script inside ~/.kde/Autostart/ directory.


export SSH_ASKPASS=/usr/bin/ssh-askpass
ssh-add < /dev/null


You can also specify the name of the key file:

ssh-add ~/.ssh/some_other_key < /dev/null

The startup script has to be correctly chmod-ed:

chmod 755 askpass.sh

Now log out and log in again and it should ask you for password. Happy ssh-ing. 🙂

One Response so far.