podman: Remote client on MacOS is not using ssh-agent and is prompting to unlock keys everytime

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

The MacOS remote client is not making use of the ssh-agent and is prompting for the password to unlock the SSH key every time podman is used.

Steps to reproduce the issue:

  1. brew install podman, config remote podman according to https://www.redhat.com/sysadmin/podman-clients-macos-windows

  2. ssh-add key on the Mac

  3. run any podman command (podman ps for example) multiple times - each time it will prompt for the unlock password

Describe the results you received:

podman prompts for the unlock password for the SSH key every time

Describe the results you expected:

podman not to prompt for the unlock password and to use the ssh-agent

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

podman version 2.1.1

Output of podman info --debug:

Mikes-MacBook:~ mike$ podman info --debug
Key Passphrase: 
host:
  arch: amd64
  buildahVersion: 1.16.1
  cgroupManager: cgroupfs
  cgroupVersion: v1
  conmon:
    package: conmon-2.0.21-1.el8.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.0.21, commit: 44dc2e90174f4dcd4040012a62364e7f2564d431-dirty'
  cpus: 12
  distribution:
    distribution: '"centos"'
    version: "8"
  eventLogger: journald
  hostname: removed.host
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
  kernel: 4.18.0-193.19.1.el8_2.centos.plus.x86_64
  linkmode: dynamic
  memFree: 31318765568
  memTotal: 33448837120
  ociRuntime:
    name: runc
    package: runc-1.0.0-145.rc91.git24a3cf8.el8.x86_64
    path: /usr/bin/runc
    version: 'runc version spec: 1.0.2-dev'
  os: linux
  rootless: true
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.1.4-2.el8.x86_64
    version: |-
      slirp4netns version 1.1.4
      commit: b66ffa8e262507e37fca689822d23430f3357fe8
      libslirp: 4.3.1
      SLIRP_CONFIG_VERSION_MAX: 3
  swapFree: 16877875200
  swapTotal: 16877875200
  uptime: 2h 7m 28.33s (Approximately 0.08 days)
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - registry.centos.org
  - docker.io
store:
  configFile: /home/mike/.config/containers/storage.conf
  containerStore:
    number: 3
    paused: 0
    running: 1
    stopped: 2
  graphDriverName: overlay
  graphOptions:
    overlay.mount_program:
      Executable: /usr/bin/fuse-overlayfs
      Package: fuse-overlayfs-1.1.2-1.el8.x86_64
      Version: |-
        fusermount3 version: 3.2.1
        fuse-overlayfs: version 1.1.0
        FUSE library version 3.2.1
        using FUSE kernel interface version 7.26
  graphRoot: /home/mike/.local/share/containers/storage
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "false"
  imageStore:
    number: 13
  runRoot: /run/user/1000
  volumePath: /home/mike/.local/share/containers/storage/volumes
version:
  APIVersion: 2.0.0
  Built: 1601258926
  BuiltTime: Mon Sep 28 03:08:46 2020
  GitCommit: ""
  GoVersion: go1.13.15
  OsArch: linux/amd64
  Version: 2.1.1

Package info (e.g. output of rpm -q podman or apt list podman):

client: $ brew info podman
podman: stable 2.1.1 (bottled)

server: $ rpm -q podman
podman-2.1.1-4.el8.x86_64

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?

Yes

Additional environment details (AWS, VirtualBox, physical, etc.):

MacOS Catalina - Version 10.15.6 (19G2021)

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 4
  • Comments: 32 (14 by maintainers)

Most upvoted comments

Could you open a new issue for this, if this is something we should fix.

For posterity, I’ve run into this in v3.3.1 on macOS. I first ran podman system connection add with the --identity flag. With this option it will ask for a passphrase for that key, even if that key is present in the SSH agent. I needed to re-add the connection without --identity to get podman to use my ssh-agent keys.