Intermittent failures with SSH_AUTH_SOCK and many keys loaded in agent #12289
Labels
In Progress
This issue is actively being worked by the assignee, please do not work on this at this time.
kind/bug
Categorizes issue or PR as related to a bug.
locked - please file new issue/PR
Assist humans wanting to comment on an old issue or PR with locked comments.
macos
MacOS (OSX) related
remote
Problem is in podman-remote
ssh
/kind bug
Description
podman intermittently fails with:
when using
SSH_AUTH_SOCK
, an agent with many different ssh keys loaded, e.g. 12 different ones for various different envs, servers, source control systems, etc.:and a podman remote server with a relatively low
MaxAuthTries
set (not uncommon for security reasons, some hardening even sets this to 1).The usual solution for this is to add
IdentitiesOnly=yes
to your ~/.ssh/config which I have done for my podman remote server:but podman does not respect this setting and I'm guessing it tries keys in varying orders resulting in the intermittent behavior of this issue.
As a workaround, specifying
--identity
when creating the podman system connection and removingSSH_AUTH_SOCK
from the env seems to eliminate the issue, forcing just that single identity to be used (though this is undesirable due to #7806 and the workaround #7806 (comment) via #8676):Steps to reproduce the issue:
--identity
MaxAuthTries
on the server to a low valuessh-copy-id
an ssh key to the serverssh-agent
, settingSSH_AUTH_SOCK
to point to it, and load numerous ssh keys (>MaxAuthTries
, e.g. 12) into the agent including the one you copied to the serverpodman info
and see that it intermittently failsDescribe the results you received:
Roughly half the time when I run a podman command it fails with:
Describe the results you expected:
podman remote commands to be nearly 100% reliable provided the server is up and accessible.
Additional information you deem important (e.g. issue happens only occasionally):
N/A
Output of
podman version
:(sigh)
Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
N/A
The text was updated successfully, but these errors were encountered: