You are not logged in.

#1 2017-02-15 15:31:53

rgzfxf6bhu
Member
Registered: 2015-10-30
Posts: 100

pam_ssh not working with ssh-agent and gdm

I am using a Ed25519 key to access my server.

And I wanted to use pam_ssh with gdm.

Following this wiki:
https://wiki.archlinux.org/index.php/SSH_keys#pam_ssh

My /etc/pam.d/gdm-password looks now like this:

auth     include   system-local-login
auth     optional  pam_gnome_keyring.so
auth     optional  pam_ssh.so        try_first_pass

account  include   system-local-login

password include   system-local-login
password optional  pam_gnome_keyring.so use_authtok

session  optional  pam_keyinit.so force revoke
session  include   system-local-login
session  optional  pam_gnome_keyring.so auto_start
session  optional  pam_ssh.so

I added following line to /etc/xdg/autostart/gnome-keyring-ssh.desktop:

Hidden=true

I created a systemd user service ~/.config/systemd/user/ssh-agent.service, according to this wiki:
https://wiki.archlinux.org/index.php/SS … stemd_user

But get following error:

Feb 15 16:07:39 arch polkitd[401]: Operator of unix-session:c2 successfully authenticated as unix-user:arch to gain TEMPORARY authorization for action org.freedesktop.systemd1.manage-unit-files for system-bus-name::1.259 [systemctl enable ssh-agent.service] (owned by unix-user:daniel)
Feb 15 16:09:57 arch pam_ssh[654]: /tmp/ssh-xWZyYpM5R6Ym/agent.723: No such file or directory
Feb 15 16:09:57 arch ssh-agent[711]: SSH_AUTH_SOCK=/run/user/1001/ssh-agent.socket; export SSH_AUTH_SOCK;
Feb 15 16:09:57 arch ssh-agent[711]: SSH_AGENT_PID=713; export SSH_AGENT_PID;
Feb 15 16:09:57 arch ssh-agent[711]: echo Agent pid 713;

Does anyone know what goes wrong here?

Last edited by rgzfxf6bhu (2017-02-15 15:32:31)

Offline

#2 2017-02-16 08:18:59

rgzfxf6bhu
Member
Registered: 2015-10-30
Posts: 100

Re: pam_ssh not working with ssh-agent and gdm

I disabled the systemd user service as pam_ssh should work without it, right?
But it seems it cannot start the ssh agent though, see:

pam_ssh[654]: /tmp/ssh-xWZyYpM5R6Ym/agent.723: No such file or directory

Does pam_ssh needs $SSH_AUTH_SOCK to be set somehow?

Because now I get following when checking this variable:

bash: /run/user/1001/keyring/ssh: No such file or directory

Offline

Board footer

Powered by FluxBB