Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSH Socket (.bitwarden-ssh-agent.sock) locks up after successful SSH connection. #13206

Open
1 task done
Verex opened this issue Feb 1, 2025 · 9 comments
Open
1 task done
Labels
bug desktop Desktop Application

Comments

@Verex
Copy link

Verex commented Feb 1, 2025

Steps To Reproduce

  1. Install Bitwarden and configure for MacOS (following the guide Configure Bitwarden SSH agent)
  2. Launch the Bitwarden desktop application (MacOS)
  3. Authenticate and unlock vault (in my case using FaceID or pin).
  4. Click allow on “Bitwarden” would like to access data from other apps. system prompt that shows up every time.
  5. Run ssh-add -L (public keys listed).
  6. SSH into a remote target (e.g. run ssh <user>@<host>).
  7. Accept prompt in Bitwarden to allow authentication.
  8. Exit SSH session.
  9. Run ssh-add -L or try to SSH again.

Expected Result

  • ssh-add -L should list public key parameters of all identities.
  • ssh <user>@<host> should open Bitwarden prompt to accept authentication.

Actual Result

  • ssh-add -L will hang until Bitwarden is closed (which then prints error fetching identities: communication with agent failed) or until you send SIGINT (^C).
    • Note: Running ssh-add -L after Bitwarden application is closed will print Error connecting to agent: Connection refused.
  • ssh <user>@<host> will hang until Bitwarden is closed or until you send SIGINT (^C).

Screenshots or Videos

No response

Additional Context

No response

Operating System

macOS

Operating System Version

15.2

Installation method

Direct Download (from bitwarden.com)

Build Version

2025.1.3 (36834)

Issue Tracking Info

  • I understand that work is tracked outside of GitHub. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.
@Verex Verex added bug desktop Desktop Application labels Feb 1, 2025
@bitwarden-bot
Copy link

Thank you for reporting this issue! We've added this to our internal tracking system.
ID: PM-17880

@defenestration
Copy link

This seems to happen on to me on Windows 11 as well. Same client version 2025.1.3.

  • start bitwarden
  • Notice that ssh-add -l will list my keys as expected at this time.
  • Ssh into a server which has bitwarden prompt to authorize the key.
  • SSH to the server succeeds, and can log out.
  • But then ssh-add -l will hang until i close and restart the bitwarden client.

Note the client otherwise behaves normally, as in you can browse for passwords and such.

@othyn
Copy link

othyn commented Feb 3, 2025

This has also happened to be a few times, only fix is to restart the Bitwarden client.

@quexten
Copy link
Contributor

quexten commented Feb 3, 2025

Hi, to anyone experiencing this; are you using SSH agent forwarding by any chance?

@defenestration
Copy link

defenestration commented Feb 3, 2025 via email

@Verex
Copy link
Author

Verex commented Feb 3, 2025

@quexten I can confirm that for the host used in my repro that ForwardAgent was enabled.

I was unable to reproduce this issue on that same host with ForwardAgent disabled.

Will see if I catch this happening again without ForwardAgent as I'm not certain whether I've encountered on other hosts.

@defenestration
Copy link

defenestration commented Feb 4, 2025 via email

@othyn
Copy link

othyn commented Feb 4, 2025

I also found removing ForwardAgent yes from my ~/.ssh/config helped. In fact in my case, Bitwarden wouldn't work at all until I removed it.

@quexten
Copy link
Contributor

quexten commented Feb 4, 2025

Yeah, agent forwarding is broken and the fix is pending at the moment, please disable it until then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug desktop Desktop Application
Projects
None yet
Development

No branches or pull requests

5 participants