How do I use the 1password ssh agent without installing the 1password gui?

spott
spott
Community Member
edited November 2022 in SSH

I have a headless machine (VM) that I would like to use 1password ssh agent on (I've got the 1password-cli installed), but it doesn't appear to be possible to setup the ssh agent without the gui.

Any ideas?


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: nixos
Browser:_ Not Provided
Referrer: forum-search:1password without gui

Comments

  • Jack.P_1P
    edited November 2022

    Hi @spott:

    Great question! As it currently stands, the 1Password SSH agent is only included with 1Password for Linux, and isn't part of 1Password CLI.

    With that said, if you access this virtual machine using SSH, it's possible to use SSH agent forwarding with the AgentForward SSH option. AgentForward can be set in your ~/.ssh/config file, or the -A flag can be used when running SSH: ssh -A jack@example.com.

    Let me know if that works for you, or if your situation isn't covered with agent forwarding.

    Jack

  • spott
    spott
    Community Member

    That works great! Thanks!

  • Hi @spott:

    Glad to hear it, you're very welcome! Feel free to get in touch if there's anything else we can help you with.

    Jack

  • abhishekamit
    abhishekamit
    Community Member

    Hi @Jack.P_1P,

    Do you have any plans to change this? I'm trying to use this with a GitHub codespace that I run headless and this would be helpful.

    Forwarding works okay but requires making a separate SSH connection to the instance and wouldn't work if connecting to it from an iPad.

    Would really appreciate having something that runs solely on the headless instance, even if its clunky and requires entering password a few times.

    Thanks,
    Abhishek

  • Hi @abhishekamit:

    Nothing to share just yet, but thank you for your feedback on this. I'll share your thoughts with the team.

    Jack

  • shanesveller
    shanesveller
    Community Member

    Does agent forwarding work at all with commit signing? I sometimes SSH into a headless machine that has more oomph, and then author code and commits remotely there. Being able to continue signing those commits with the same mechanism would be awesome.

  • Hi @shanesveller:

    Yes! You can definitely use agent forwarding and commit signing in tandem.

    Jack

  • @shanesveller Yep, agent forwarding works great for commit signing too! To set it up, you have to set user.signingkey, user.email, gpg.format ssh on the remote machine, because your local Gitconfig won't automatically be "forwarded" too.

This discussion has been closed.