1password ssh keys

57 views
Skip to first unread message

Dave

unread,
Jun 1, 2022, 11:52:32 AMJun 1
to iterm2-discuss
Hey guys, 

I've started to use 1password to store ssh keys. In my .ssh/config file I've got this: 

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

When I try and ssh in to a server, ssh grabs the key from 1pass and asks me to authenticate. This works fine in VSCode, iterm, etc.. 

The one place this breaks down is when trying to upload a file using the drag and drop. Iterm asks me if I want to scp the file, I say yes and then it asks me for the password, ignoring the IdentiyAgent directive. 

The log from iterm trying to connect, it seems to be probing certain key paths and then giving up. I'm unsure the meaning of ' Failed to find a valid identity for the agent'

iTerm2  NMSSH: Start <IP_ADDRESS> resolution
iTerm2  NMSSH: Socket connection to <IP_ADDRESS> on port 22 succesful
iTerm2  NMSSH: Remote host banner is SSH-.....
iTerm2  NMSSH: The host's fingerprint is <HOST_FINGERPRINT>
iTerm2  NMSSH: No known hosts file /etc/ssh/ssh_known_hosts.
iTerm2  NMSSH: Check for host <IP_ADDRESS>, port 22 in file /Users/d/.ssh/known_hosts
iTerm2  NMSSH: Match
iTerm2  NMSSH: SSH session started
iTerm2  NMSSH: User auth list: publickey,password
iTerm2  NMSSH: Failed to find a valid identity for the agent
iTerm2  NMSSH: User auth list: publickey,password
iTerm2  No key file at /Users/d/.ssh/id_rsa
iTerm2  No key file at /Users/d/.ssh/id_dsa
iTerm2  No key file at /Users/d/.ssh/id_ecdsa
iTerm2  Transfer finished. error=Error Domain=libssh2 Code=0 "" UserInfo={NSLocalizedDescription=}
iTerm2  NMSSH: Disconnected

Anyone got any ideas?

David Whitmarsh

unread,
Jun 15, 2022, 5:32:54 PMJun 15
to iterm2-discuss
https://iterm2.com/documentation-shell-integration.html says that iterm doesn't actually shell out to `scp`, but instead links libssh2 and only respects certain settings in ssh_config. IdentityFile is included in that list but IdentityAgent is not. 

Dave

unread,
Jun 17, 2022, 10:03:42 AMJun 17
to iterm2-discuss
Thanks for that, at least I understand what the issue is now. 
Reply all
Reply to author
Forward
0 new messages