It seems that the recommended KDE way of doing this is with a suitable script in $HOME/.config/plasma-workspace/env I've tested that with something like: #### ksshagt.sh ### if [ -z "$SSH_AUTH_SOCK" ] ; then eval `ssh-agent -s` fi #### The "if" test is needed, in case the KDE login is with X11, where there is already ssh-agent being started and we won't want to start a second one. And it is recommended that a shutdown script also be used to terminate ssh-agent on logout. This seems to be working fine, and is probably better than using the standard shell startup script.