Skip to main content
Mar 20, 2022 8:26 AM UTC
Question

ForwardAgent?

I noticed that when I log in my server with a key that is in 1Password and I try to log in from there to other servers, that I need to provide my password. Apparently ForwardAgent does not work, or do I have to do something special?


1Password Version: 8.7.0
Extension Version: Not Provided
OS Version: macOS 12.3

20 replies

Nov 18, 2022 11:23 AM UTC

Hi
Same problem here.
Forwarding is not working with 1Password agent. I get a Permission denied (publickey). when trying to ssh on the second server.

Jack_P_1P
1Password Employee
1Password Employee
Nov 18, 2022 7:16 PM UTC

Hi @spacehog:

Do you have IdentityAgent, SSH_AUTH_SOCK, or both configured to use the 1Password SSH agent on your local machine? Let me know!

Jack

Nov 19, 2022 11:14 PM UTC

Hi Jack,
I use IdentityAgent for 1Pasword. But I totally forgot I also have SSH_AUTH_LOCK that points to my keychain SSH agent. I guess I have to disable the keychain SSH agent before retrying.
I’ll tell you if it resolves my problem.

Nov 20, 2022 8:46 PM UTC

I'm trying to forward my 1Password SSH agent running on Windows 11, and when logging into my server it just hangs before showing a prompt. I can ^c and it cancels the connection, so it's probably also before a terminal is properly allocated?

Anyway, I honestly have no idea what's going on here, but I'm hoping someone might be able to let me know if this is some sort of bug or limitation, or if I have something set wrong on my server. Thank you!

Nov 21, 2022 8:45 AM UTC

@Jack I have made some progress.
I have a private key file for the second server, if I add it in 1Password, forwarding works.
But if I try to add it via ssh-add, I get an error:
Could not add identity "keys": agent refused operation

It's funny because ssh-add -l works well and lists all my private keys from 1Password.

The SSH_AUT_LOCK points to ~/.1password/agent.sock.

Nov 21, 2022 11:22 AM UTC

Here is the message I have found in 1Password logs:
Unsupported message sent to agent: AddIdentity

Nov 24, 2022 11:39 AM UTC

@Jack.P_1P Do you have an idea of what could cause the error message when using ssh-add?

Jack_P_1P
1Password Employee
1Password Employee
Nov 29, 2022 4:49 PM UTC

Hi @spacehog:

Thanks for sharing that. Adding keys to the 1Password SSH agent can only be done directly from 1Password, not by using ssh-add. With that said, we have an internal issue tracking being unable to use ssh-add to import keys into 1Password, so I'll share your feedback with the team.

ref: dev/core/core#13363

@br_:

We'd likely have to take a closer look at your specific setup. Please email us at businesssupport@1password.com mentioning that you're having trouble with SSH forwarding, and we'll be in touch.

Jack

Mar 20, 2023 3:11 PM UTC

same here, forwarding don't work anymore when ssh'ing from another machine into this one until you comment out the IdentityAgent line


Host *
ForwardAgent yes
IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"

(I login from 1 MacBook Air to another pro, both have 1pw)

Jack_P_1P
1Password Employee
1Password Employee
Mar 24, 2023 9:55 PM UTC

Hi @proza:

Thanks for sharing. We're continuing to investigate how we can make this smoother when connecting to a host that also has 1Password SSH Agent enabled, so thanks for your feedback!

Jack