-
-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use host yubikey-agent inside a docker container #143
Comments
Hi! If you don't use default osx ssh-agent, you can remap it socket to yubikey-agent socket with such launch agent: $ cat ~/Library/LaunchAgents/link-ssh-auth-sock.plist <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http:https://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>link-ssh-auth-sock</string>
<key>ProgramArguments</key>
<array>
<string>/bin/sh</string>
<string>-c</string>
<string>/bin/ln -sf /usr/local/var/run/yubikey-agent.sock $SSH_AUTH_SOCK</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist> Then, force to launch it with $ docker run -ti --rm -v /run/host-services/ssh-auth.sock:/ssh-agent -e SSH_AUTH_SOCK="/ssh-agent" So, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, thanks for the great agent. I've been using it on my Mac without a problem! However recently I need to use the Yubikey-agent inside a docker container because we need to ssh to a remote machine inside the container, but we'd like to have everyone use their own local ssh setup, i.e. yubikey-agent on my Mac. Setting up the environment
SSH_AUTH_SOCK
inside the container to the agent socket on my host machine with proper mounting didn't work. I also saw other ways to mount special path/run/host-services/ssh-auth.sock
to the container, but it didn't work out either. Do you have any suggestion on how to use this agent inside a docker container? Thanks!The text was updated successfully, but these errors were encountered: