Session was not authorized - Constantly

esttorhe
esttorhe
Community Member

OS: Ubuntu 20.04.4 LTS
WM: i3 (in case this helps)
op CLI version: 1.12.4
Polkit Configured/Enabled: yes
SSH_AUTH_SOCK: ~/.1password/agent.sock

~/.ssh/config

### default for all ##
Host *
  ForwardAgent no
  ForwardX11 no
  ForwardX11Trusted yes
  Port 22
  Protocol 2
  ServerAliveInterval 60
  ServerAliveCountMax 30

Host github.com
  IdentityFile ~/.ssh/id_github.pub
  IdentitiesOnly yes
  IdentityAgent ~/.1password/agent.sock

After many tried I managed to get to a point where it does seem to be working (at least running) but it doesn't matter what I try I keep getting the Session was not authorized

I thought at some point it might have been an issue with my key; so I generated a new one directly from 1P. I have tried specifying the IndentityFile as suggested in the docs to point to which key to use; still doesn't work.

When calling

ssh -vT git@github.com

I'm getting:

sign_and_send_pubkey: signing failed for ED25519 "<redacted>/.ssh/id_github.pub" from agent: agent refused operation
debug1: No more authentication methods to try.
git@github.com: Permission denied (publickey).

And from the logs:

INFO  2022-03-26T13:19:40.825 tokio-runtime-worker(ThreadId(3)) [1P:ssh/op-ssh-agent/src/lib.rs:370] Session was not authorized

This makes me think that the polkit is not working as expected; but I have already disabled/re-enabled and rebooted the machine multiple times.


1Password Version: 8.6.0
Extension Version: Not Provided
OS Version: Ubuntu 20.04.4 LTS

Comments

  • neobit
    neobit
    Community Member
    edited November 2022

    Same problem with i3.
    My understanding is that 1password uses pop up to authorize (sic!) which is not shown.

  • bigtopper
    bigtopper
    Community Member

    Same happening here, also on i3, but on Arch Linux.

  • acr92
    acr92
    Community Member

    For me (xubuntu with i3wm) the root cause of my issue was that polkit was not running.

    I added this to my i3 config:

    exec --no-startup-id /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
    exec --no-startup-id 1password
    

    Then everything worked fine.

  • bigtopper
    bigtopper
    Community Member

    Thanks @acr92! You put me on the right path. I could see the polkitd daemon running, but there was no authentication agent running alongside it.

    I use Xfce, so for me it was a case of installing xfce-polkit from AUR (packages for other desktop managers are listed on the wiki), and then adding /usr/lib/xfce-polkit/xfce-polkit & to my ~/.xinitrc file.

    Now the 1Password SSH agent works successfully.

  • Hi all, thanks for the discussion here, and I'm happy it sounds like you were able to fix it. We've also seen this issue relating to polkit not running come up a few times, and while I don't have a timeline I can share we are working to address the issue. Stat tuned.

  • cengizio
    cengizio
    Community Member
    edited January 2023

    Hello. I was having the exact same problem with my i3wm setup. Getting the polkit-gnome-authentication-agent-1 running in background solved my issue as well.

    Perhaps 1password agent can check if there are no listeners registered in dbus as a policy kit agent?

    Or even better, it can show a log of rejected requests in Advanced tab so that we get to know what's going on earlier?

This discussion has been closed.