Skip to content

Digital Javelina

We build the AI tools and custom software your business actually needs.

  • Home
  • Services
  • Work
  • Blog
  • The AI Clinicians
  • Free Tools for Clinicians and Builders
  • About
  • Contact

Search

Setting Up and Using SSH Keys in 1Password

February 23, 2026 Updated October 7, 2026 5 min read Homelab, macOS
Hand-drawn illustration: an SSH key stored inside a locked vault, connected to a server

This guide walks through generating SSH keys in 1Password, configuring your Mac to use the 1Password SSH agent, and adding your public key to remote services.

Prerequisites

  • 1Password 8 or later installed on macOS
  • Terminal access
  • Accounts on services you want to authenticate (GitHub, remote servers, etc.)

Step 1: Generate an SSH Key in 1Password

  1. Open 1Password
  2. Click + New Item
  3. Select for and select SSH Key
    1Password Add New dialog with ssh typed in the search box and SSH Key highlighted at the top of the results
  4. Name the key descriptively (e.g., “GitHub SSH Key” or “SSH Key”)
  5. Click Add Private Key
    New SSH Key item in 1Password with the Add Private Key menu open, offering Generate a New Key, Import a Key File, and Paste Key from Clipboard
  6. Select Generate a New Key
  7. Choose “Ed25519” as the key type and click Generate
    1Password key generation panel with Key Type set to Ed25519 and a Generate button
  8. Click Save

Understanding What 1Password Shows You

After saving, 1Password displays a summary of your key:

1Password SSH Key item showing the new Ed25519 key with its SHA256 fingerprint and a Replace Private Key button

This screen shows the key fingerprint — not the actual public or private key. The fingerprint (e.g., SHA256:/HB/SPJwCw...) is a short hash derived from the public key, used to identify it at a glance. It’s safe to share.

Here’s how the three parts of an SSH key differ:

Part What It Is Safe to Share?
Private Key The secret key stored inside 1Password Never
Public Key The long ssh-ed25519 AAAA... string Yes
Fingerprint A short hash of the public key (SHA256) Yes

This is what it looks like in the 1Password application window:
1Password SSH Key item listing the public key, fingerprint, hidden private key, and key type Ed25519

The “+ Replace Private Key” button at the bottom of the confirmation window verfies 1Password is securely holding your private key. You’ll never need to export it — the 1Password SSH agent handles authentication without ever exposing the private key to your filesystem.

When you need to add your key to a service like GitHub (Step 4), you’ll copy the public key, not the fingerprint. I cannot stress this enough: NEVER share your private key with anyone or anywhere. Doing so will allow anyone to gain access to your account, and in this case, the computer into which you are SSHing.

Step 2: Enable the 1Password SSH Agent

  1. Open 1Password
  2. Go to Settings (Cmd + ,)
  3. Click Developer
  4. Enable Use the SSH Agent
    1Password Developer settings with the SSH Agent running and Use the SSH Agent checked, plus advanced approval options

Step 3: Configure SSH to Use 1Password

Create or replace your SSH config file to point to the 1Password agent.
Note: 2BUA8C4S2C.com.1password is AgileBits’ (1Password’s developer) Apple Team ID and bundle identifier. It is a fixed, universal value baked into the app. Every Mac running 1Password 8 uses the same Group Container path for the SSH agent socket.

Backup your SSH config file first:

cp ~/.ssh/config ~/.ssh/config.backup 2>/dev/null

Then:

cat > ~/.ssh/config Host *
IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
EOF

Set correct permissions:

chmod 600 ~/.ssh/config

Step 4: Add Your Public Key to Services You Want to Use

GitHub

  1. In 1Password, open your SSH key item
  2. Click Copy next to the public key (e.g., from the example above):
    1Password SSH Key item with the public key row highlighted and a Copy button beside it
  3. Go to GitHub → Settings → SSH and GPG keys
    GitHub settings sidebar with SSH and GPG keys selected
  4. At the top of the page, click New SSH key
    GitHub SSH keys page header with a green New SSH key button
  5. Add a descriptive title for your new key (e.g., Laptop SSH Key)
  6. Make sure the Key type is set to Authentication Key
  7. Paste the public key
  8. Click Add SSH key
    GitHub Add new SSH Key form with the title Laptop SSH Key, key type Authentication Key, and a pasted ssh-ed25519 public key

Test the connection in your terminal:

ssh -T [email protected]

1Password will prompt you to authorize. After confirming, you should see:

Hi username! You've successfully authenticated, but GitHub does not provide shell access.

Remote Servers (Linux/macOS)

For each remote server, add your public key to its authorized_keys file. Once ssh yourserver works without a password, Topgrade can update that server over SSH in the same run as your Mac.

  1. Copy your public key from 1Password
  2. SSH into the server using password authentication:
ssh user@hostname
  1. Add your public key:
mkdir -p ~/.ssh && chmod 700 ~/.ssh

echo 'your-public-key' >> ~/.ssh/authorized_keys

chmod 600 ~/.ssh/authorized_keys

exit

Replace your-public-key with your actual public key.

  1. Test passwordless login:
ssh user@hostname

1Password should prompt for authorization instead of asking for a password. Setting up a Proxmox server? The NFS guide for sharing Mac storage with Proxmox lists SSH access as a prerequisite.

Harden the Server (Recommended)

Now that key-based authentication is working, consider disabling password authentication on the server to prevent brute-force attacks:

sudo sed -i 's/^\#*PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd\_config

sudo systemctl restart sshd

sudo sed -i ‘s/^#PasswordAuthentication./PasswordAuthentication no/’ /etc/ssh/sshd_config
sudo systemctl restart sshd

Before doing this, make sure your key-based login is working — otherwise you’ll lock yourself out. It’s a good idea to keep a second terminal session open to the server while testing.

Step 5: Add Host Aliases (Optional)

You can add shortcuts for frequently accessed servers in your SSH config:

cat > ~/.ssh/config > ~/.zshrc

Then reload your shell:

source /.zshrc

Now verify that the 1Password agent is responding:

ssh-add -l

If everything is set up correctly, you’ll see your 1Password keys listed. If you instead see:

The agent has no identities.

Double-check that:

  • The 1Password SSH agent is enabled (Step 2)
  • You have at least one SSH key saved in 1Password (Step 1)
  • 1Password is open and unlocked

Note: If you use Bash instead of Zsh, replace ~/.zshrc with ~/.bashrc in the commands above.

Verify host fingerprints on first connection

The first time you SSH into a new server, you’ll see a prompt like:

The authenticity of host 'hostname (192.168.x.x)' can't be established.
ED25519 key fingerprint is SHA256:xxxxxxxxxxxxxxxxxxx.
Are you sure you want to continue connecting (yes/no/[fingerprint](#))?

Don’t blindly type “yes.” Verify the fingerprint matches your server’s actual host key. You can check it on the server itself by running:

ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub

This protects against man-in-the-middle attacks where someone intercepts your connection and pretends to be the server.

Summary

Task Command/Action
Test GitHub auth ssh -T [email protected]
List available keys ssh-add -l
View SSH config cat ~/.ssh/config
Connect to host alias ssh hostname

Written by Michael Henry

Michael Henry, MD, a board-certified pediatric hematologist oncologist, writes on Claude Code, AI tools, homelab, and self-hosting for clinicians and builders.

Want something like this built for your business? See Services.

Post navigation

Previous: Accessing Your Linux VM from Mac Finder: A Complete Guide to Samba File Sharing
Next: Auto-Sanitize Blog Posts Before Publishing: A Security Audit Pipeline with Claude Code and fswatch
Michael Henry

Michael Henry

Michael Henry, MD, a board-certified pediatric hematologist oncologist, writes on Claude Code, AI tools, homelab, and self-hosting for clinicians and builders.

© 2026 Digital Javelina, LLC | Privacy Policy | Terms of Use