Reply to topic

I can't find what launchs ssh-agent on login?

Horace
Registered Member
Posts
5
Karma
0
OS
Hello,

I am trying to locate what process launches ssh-agent and/or gpg-agent on login. See below:

Code: Select all
/usr/bin/dbus-launch --sh-syntax --exit-with-session /usr/bin/ssh-agent /usr/bin/gpg-agent --sh --daemon --keep-display --write-env-file /home/lhorace/.gnupg/agent.info-linux-0egw:0 /etc/X11/xinit/xinitrc


I glanced at /usr/bin/startkde script and noticed line 296. However, this isn't quite what I was looking for to determine what process launches {ssh,gpg}-agent:

Code: Select all
# Make sure that D-Bus is running
# D-Bus autolaunch is broken
if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
    eval `dbus-launch --sh-syntax --exit-with-session`
fi



Any assitance I can get from community to locate the solution for this problem above would be greateful. Ty
User avatar Sudhir Khanger
Registered Member
Posts
237
Karma
0
OS
ssh-agent starts startkde in Fedora. ssh-agent and gpg-agent has no relationship. You could run ssh-agent via gpg-agent.

Code: Select all
[[email protected] ~]$ ps aux | grep ssh-agent
sudhir    2440  0.0  0.0  53408  1980 ?        Ss   Sep27   0:00 /usr/bin/ssh-agent /bin/sh -c exec -l /bin/bash -c "/usr/bin/startkde"
Horace
Registered Member
Posts
5
Karma
0
OS
Interestingly, I should have stated my distro, which is openSUSE 13.2. I doubt that's how it is launched here.

In fedora, I would assume that is launched by your display manager yes?
luebking
Karma
0
That doesn't depend on the distro, but rather on the display manager (gdm, kdm, sddm, ...)
The line will either be called by the DM or the session script, for startkde (from KDE5), additional bits could be found in /etc/xdg/plasma-workspace/env or ~/.config/plasma-workspace/env
graemep
Registered Member
Posts
6
Karma
0
OS
I have the same problem with Kubuntu 15.10

I am pretty sure it is something I did while trying to get KDE to work with ssh-agent. So far I have been through all the lightdm config and found nothing. pstree and Ksysguard both show ssh-agent as a child of startkde, not vice-versa.
User avatar psychonaut
Registered Member
Posts
27
Karma
1
OS
As others have mentioned, it's probably the display manager that's launching ssh-agent, probably in a distribution-specific manner. You can try finding the script that launches it by searching the /etc hierarchy. For example:

Code: Select all
sudo ack ssh-agent /etc

The OP is running openSUSE. Recent versions seem to call ssh-agent from /etc/X11/xdm/scripts/11-ssh-agent.

 
Reply to topic

Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot], ostroffjh, Yahoo [Bot]