Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. With Bitwarden, you can store your SSH keys and use the desktop app to expose a SSH agent socket

With Bitwarden, you can store your SSH keys and use the desktop app to expose a SSH agent socket

Scheduled Pinned Locked Moved Uncategorized
bitwardeninfosecsshauthn
5 Posts 2 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • x_cli@infosec.exchangeX This user is from outside of this forum
    x_cli@infosec.exchangeX This user is from outside of this forum
    x_cli@infosec.exchange
    wrote last edited by
    #1

    With Bitwarden, you can store your SSH keys and use the desktop app to expose a SSH agent socket.
    Some SSH servers have a MaxAuthTries configured with a low value.
    If you use a SSH agent loaded with more keys that the MaxAuthTries value, and the required key is not in the MaxAuthTries first tried keys, you get an authentication error.
    In CLI, you just pop a new SSH agent, load it with the "only key you need" and off you go.
    With Bitwarden, you cannot do that (I think).

    I have been thinking about implementing a SSH agent proxy that connects to Bitwarden, lists the keys available, and create a new agent per listed key, answering only for that key.
    You could then configure SSH to use that SSH agent socket or that other SSH agent socket depending on the host you connect to, with IdentitiesOnly and an IdentityAgent pointing to the right SSH agent socket.

    What do you think? Would you use that proxy?

    #Bitwarden #infosec #ssh #authn

    skyper@fosstodon.orgS 1 Reply Last reply
    0
    • x_cli@infosec.exchangeX x_cli@infosec.exchange

      With Bitwarden, you can store your SSH keys and use the desktop app to expose a SSH agent socket.
      Some SSH servers have a MaxAuthTries configured with a low value.
      If you use a SSH agent loaded with more keys that the MaxAuthTries value, and the required key is not in the MaxAuthTries first tried keys, you get an authentication error.
      In CLI, you just pop a new SSH agent, load it with the "only key you need" and off you go.
      With Bitwarden, you cannot do that (I think).

      I have been thinking about implementing a SSH agent proxy that connects to Bitwarden, lists the keys available, and create a new agent per listed key, answering only for that key.
      You could then configure SSH to use that SSH agent socket or that other SSH agent socket depending on the host you connect to, with IdentitiesOnly and an IdentityAgent pointing to the right SSH agent socket.

      What do you think? Would you use that proxy?

      #Bitwarden #infosec #ssh #authn

      skyper@fosstodon.orgS This user is from outside of this forum
      skyper@fosstodon.orgS This user is from outside of this forum
      skyper@fosstodon.org
      wrote last edited by
      #2

      @x_cli Have you considered reporting the issue to Bitwarden (even though I suppose it's already known), and why not contributing to it to fix it?

      x_cli@infosec.exchangeX 1 Reply Last reply
      0
      • skyper@fosstodon.orgS skyper@fosstodon.org

        @x_cli Have you considered reporting the issue to Bitwarden (even though I suppose it's already known), and why not contributing to it to fix it?

        x_cli@infosec.exchangeX This user is from outside of this forum
        x_cli@infosec.exchangeX This user is from outside of this forum
        x_cli@infosec.exchange
        wrote last edited by
        #3

        @Skyper I feel like Bitwarden is not the issue here. It feels legitimate for a SSH agent to hold many keys.

        Even OpenSSH planned/did a protocol extension for this: https://www.openssh.org/agent-restrict.html

        My proxy proposal would not require a protocol extension.

        skyper@fosstodon.orgS 1 Reply Last reply
        0
        • x_cli@infosec.exchangeX x_cli@infosec.exchange

          @Skyper I feel like Bitwarden is not the issue here. It feels legitimate for a SSH agent to hold many keys.

          Even OpenSSH planned/did a protocol extension for this: https://www.openssh.org/agent-restrict.html

          My proxy proposal would not require a protocol extension.

          skyper@fosstodon.orgS This user is from outside of this forum
          skyper@fosstodon.orgS This user is from outside of this forum
          skyper@fosstodon.org
          wrote last edited by
          #4

          @x_cli From what I understood, the issue is that the built-in Bitwarden SSH agent loads all the available keys at once, potentially triggering the server-side max limit.

          The approach I was considering is to add the possibility to load only specific keys into the Bitwarden built-in agent. It's exactly what I do with KeePassXC and its SSH agent.

          skyper@fosstodon.orgS 1 Reply Last reply
          0
          • skyper@fosstodon.orgS skyper@fosstodon.org

            @x_cli From what I understood, the issue is that the built-in Bitwarden SSH agent loads all the available keys at once, potentially triggering the server-side max limit.

            The approach I was considering is to add the possibility to load only specific keys into the Bitwarden built-in agent. It's exactly what I do with KeePassXC and its SSH agent.

            skyper@fosstodon.orgS This user is from outside of this forum
            skyper@fosstodon.orgS This user is from outside of this forum
            skyper@fosstodon.org
            wrote last edited by
            #5

            @x_cli To give you more context, here are some screenshots of how KeePassXC implements things.

            I use KeePassXC inside an off-the-grid VM on @QubesOS. It's a great way the keep all my secrets and the ones of my clients at @SkypLabs safe.

            The communication with the SSH agent that actually handles the connection is made via qrexec, in internal Qubes OS RPC mechanism (see https://forum.qubes-os.org/t/split-ssh/19060).

            Link Preview ImageLink Preview Image
            1 Reply Last reply
            1
            0
            • R relay@relay.infosec.exchange shared this topic
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups