Skip to content

How to Fix 1Password SSH Agent Issues

DodaTech Updated 2026-06-24 2 min read

In this tutorial, you'll learn about How to Fix 1Password SSH Agent Issues. We cover key concepts, practical examples, and best practices to help you understand and apply this topic effectively.

ssh-add -l shows no keys even though you have SSH keys in 1Password. The 1Password SSH agent is not configured or not running.

The Wrong Way

# Generating a new SSH key outside 1Password
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519

This creates a key that is not managed by 1Password and cannot be used from other devices.

The Right Way

Step 1: Enable the 1Password SSH agent

# Desktop app: Settings → Developer → "Use the SSH agent"
# Check "Integrate with 1Password SSH agent"

Step 2: Configure the SSH agent socket

# Add to ~/.ssh/config:
Host *
  IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
# (path varies by OS — check 1Password settings for the exact path)

Step 3: Set the SSH_AUTH_SOCK environment variable

# Add to ~/.zshrc or ~/.bashrc:
export SSH_AUTH_SOCK=~/Library/Group\ Containers/2BUA8C4S2C.com.1password/t/agent.sock

# Reload:
source ~/.zshrc

Step 4: Test the agent

ssh-add -l
# The agent socket exists but shows no keys
# That is correct — keys are added on demand

# Test with a specific host:
ssh -T git@github.com
# Hi username! You've successfully authenticated.
SSH agent working — git push to GitHub authenticated via 1Password SSH key, no passphrase prompt.

Prevention

  • Add SSH keys to 1Password as "SSH Key" type items (not just text notes).
  • Use the 1Password SSH agent instead of ssh-agent for cross-device key sync.
  • The SSH agent integration is the same technology used by Doda Browser's developer tools — secure key storage without manual file management.

Common Mistakes with ssh agent

  1. Overlapping type class instances that cause GHC to reject the program with ambiguous dispatch errors
  2. Non-exhaustive pattern matches that compile with warnings then crash at runtime
  3. Misunderstanding that String is [Char] with poor performance for large text operations

These mistakes appear frequently in real-world 1PASSWORD code. DodaTech's contributors have identified these patterns through analysis of open-source projects and production systems.

Practice Exercise

Write a pure function that safely divides two integers using Maybe, then test it with edge cases like division by zero and negative numbers.

This exercise reinforces the concepts covered in this guide. Try implementing it before checking online solutions.

FAQ

### How do I add an existing SSH key to 1Password?

In the 1Password desktop app: create a new item → type "SSH Key" → paste your private key (including the -----BEGIN OPENSSH PRIVATE KEY----- block). The key syncs to all devices and is available via the SSH agent.

Can I use 1Password SSH agent with VS Code?

Yes. The SSH agent works with any tool that connects via SSH — VS Code Remote SSH, JetBrains IDEs, and command-line tools. Configure IdentityAgent in ~/.ssh/config as shown above.

Is the 1Password SSH agent available on Linux and Windows?

Linux: Yes, the SSH agent is available in the 1Password Linux desktop app (requires system tray support). Windows: Yes, 1Password integrates with Windows OpenSSH. The socket path differs by platform.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro