You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Setting up step ssh on macOS when also using gpg-agent for SSH
This assumes you are using step ssh while you also need to use a hardware-backed GPG key (such as a Yubikey) to derive an SSH key and are using gpg-agent. In my case, this derived SSH key is used for GitHub and Gitea access.
For gpg-agent to work as expected with SSH, you probably have these lines or their equivalent in your ~/.zshrc file:
The effect of those lines will be to disable your ssh-agent, which is required for step ssh to work as expected.
You have two possible solutions:
You can use a different SSH key, such as using a FIDO2 SSH key, which will not use gpg-agent at all. Since OpenSSH v8.2, you can follow this guide and your SSH key will be decoupled from SSH. Crucially, this does not impede your ability to sign commits using gpg with a hardware device. For this to work on macOS, you will need to install the latest version of OpenSSH: brew install openssh
You can also use the excellent iTerm2 and simply create a second profile. You will need to login to step ssh every time you launch the profile as the ssh-agent is killed when you exit the terminal window. To that effect, create a profile and in the Send text at start box, add:
eval`ssh-agent`&& step ssh login
Note: If you already have gpg-agent configured when you install step ssh, you might need to run step ssh config --force after logging in for the setup to complete successfully.
This discussion was converted from issue #1716 on February 12, 2024 22:50.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This might have a better home as a knowledge base article
Beta Was this translation helpful? Give feedback.
All reactions