Skip to content
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

podman remote fails when .ssh/known_hosts contains outdated ciphers #25325

Open
tengelmeier opened this issue Feb 14, 2025 · 4 comments
Open
Labels
kind/bug Categorizes issue or PR as related to a bug. macos MacOS (OSX) related remote Problem is in podman-remote

Comments

@tengelmeier
Copy link

Issue Description

podman info fails when .ssh/known_hosts contains unknown ciphers

Steps to reproduce the issue

Steps to reproduce the issue

  1. add an unknown cipher to .ssh/known_hosts (e.g. for macOS 15 192.168.10.10 SHA256:sv4XrPwL60H)

  2. run podman info

Expected: Unknown Ciphers skipped
Real: Error above

Describe the results you received

>podman info           
OS: darwin/arm64
buildOrigin: brew
provider: applehv
version: 5.4.0

Cannot connect to Podman. Please verify your connection to the Linux system using `podman system connection list`, or try `podman machine init` and `podman machine start` to manage a new Linux VM
Error: unable to connect to Podman socket: knownhosts: /Users/xx/.ssh/known_hosts:4: knownhosts: missing key type pattern

Describe the results you expected

>podman info           
podman info
Client:
  APIVersion: 5.4.0
  BuildOrigin: brew
  Built: 1739290083
  BuiltTime: Tue Feb 11 17:08:03 2025
[...]

podman info output

Client:
  APIVersion: 5.4.0
  BuildOrigin: brew
  Built: 1739290083
  BuiltTime: Tue Feb 11 17:08:03 2025
  GitCommit: ""
  GoVersion: go1.23.6
  Os: darwin
  OsArch: darwin/arm64
  Version: 5.4.0
host:
  arch: arm64
  buildahVersion: 1.39.0
  cgroupControllers:
  - cpuset
  - cpu
  - io
  - memory
  - pids
  - rdma
  - misc
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.1.12-3.fc41.aarch64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.12, commit: '
  cpuUtilization:
    idlePercent: 99.53
    systemPercent: 0.23
    userPercent: 0.25
  cpus: 2
  databaseBackend: sqlite
  distribution:
    distribution: fedora
    variant: coreos
    version: "41"
  eventLogger: journald
  freeLocks: 2047
  hostname: localhost.localdomain
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 6.12.9-200.fc41.aarch64
  linkmode: dynamic
  logDriver: journald
  memFree: 3255861248
  memTotal: 3791171584
  networkBackend: netavark
  networkBackendInfo:
    backend: netavark
    dns:
      package: aardvark-dns-1.13.1-1.fc41.aarch64
      path: /usr/libexec/podman/aardvark-dns
      version: aardvark-dns 1.13.1
    package: netavark-1.13.1-1.fc41.aarch64
    path: /usr/libexec/podman/netavark
    version: netavark 1.13.1
  ociRuntime:
    name: crun
    package: crun-1.19.1-1.fc41.aarch64
    path: /usr/bin/crun
    version: |-
      crun version 1.19.1
      commit: 3e32a70c93f5aa5fea69b50256cca7fd4aa23c80
      rundir: /run/crun
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +LIBKRUN +WASM:wasmedge +YAJL
  os: linux
  pasta:
    executable: /usr/bin/pasta
    package: passt-0^20241211.g09478d5-1.fc41.aarch64
    version: |
      pasta 0^20241211.g09478d5-1.fc41.aarch64-pasta
      Copyright Red Hat
      GNU General Public License, version 2 or later
        <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
      This is free software: you are free to change and redistribute it.
      There is NO WARRANTY, to the extent permitted by law.
  remoteSocket:
    exists: true
    path: unix:///run/podman/podman.sock
  rootlessNetworkCmd: pasta
  security:
    apparmorEnabled: false
    capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
    rootless: false
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: true
  serviceIsRemote: true
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.3.1-1.fc41.aarch64
    version: |-
      slirp4netns version 1.3.1
      commit: e5e368c4f5db6ae75c2fce786e31eef9da6bf236
      libslirp: 4.8.0
      SLIRP_CONFIG_VERSION_MAX: 5
      libseccomp: 2.5.5
  swapFree: 0
  swapTotal: 0
  uptime: 1h 32m 32.00s (Approximately 0.04 days)
  variant: v8
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - docker.io
store:
  configFile: /usr/share/containers/storage.conf
  containerStore:
    number: 1
    paused: 0
    running: 0
    stopped: 1
  graphDriverName: overlay
  graphOptions:
    overlay.additionalImageStores:
    - /usr/lib/containers/storage
    overlay.imagestore: /usr/lib/containers/storage
    overlay.mountopt: nodev,metacopy=on
  graphRoot: /var/lib/containers/storage
  graphRootAllocated: 93531090944
  graphRootUsed: 3995615232
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Supports shifting: "true"
    Supports volatile: "true"
    Using metacopy: "true"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 1
  runRoot: /run/containers/storage
  transientStore: false
  volumePath: /var/lib/containers/storage/volumes
version:
  APIVersion: 5.4.0
  BuildOrigin: Fedora Project
  Built: 1739232000
  BuiltTime: Tue Feb 11 01:00:00 2025
  GitCommit: ""
  GoVersion: go1.23.5
  Os: linux
  OsArch: linux/arm64
  Version: 5.4.0

Podman in a container

No

Privileged Or Rootless

None

Upstream Latest Release

Yes

Additional environment details

Additional environment details

Additional information

Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting

@tengelmeier tengelmeier added the kind/bug Categorizes issue or PR as related to a bug. label Feb 14, 2025
@github-actions github-actions bot added macos MacOS (OSX) related remote Problem is in podman-remote labels Feb 14, 2025
@Luap99 Luap99 changed the title podman info fails when .ssh/known_hosts contains outdated ciphers podman remote fails when .ssh/known_hosts contains outdated ciphers Feb 14, 2025
@jakecorrenti
Copy link
Member

It looks like you installed podman from Homebrew. Can you try installing from the pkginstaller and see if that works? Installing from Homebrew is not a supported method. Thanks!

@baude
Copy link
Member

baude commented Feb 14, 2025

if you repeat it with the installer, can you share the offending line?

@tengelmeier
Copy link
Author

tengelmeier commented Feb 15, 2025

uninstalled via homebrew and installed with the installer => same issue

Putting this in line 1 of .ssh/known_hosts

192.168.1.1 SHA256:7b248364ac549a605dc9ee9ef75a3581ec95b58817119d11d01bb2acc7992c8e

results in

podman info
OS: darwin/arm64
buildOrigin: pkginstaller
provider: applehv
version: 5.4.0

Cannot connect to Podman. Please verify your connection to the Linux system using `podman system connection list`, or try `podman machine init` and `podman machine start` to manage a new Linux VM
Error: unable to connect to Podman socket: knownhosts: /Users/xx/.ssh/known_hosts:1: knownhosts: missing key type pattern

@atlemagnussen
Copy link

atlemagnussen commented Feb 15, 2025

I also get this error now.
Fun thing though - it worked earlier today on the same version 5.3.2 from brew.

Now it does not work on either 5.3.2 or 5.4.0 from pkginstaller

Edit: it works when I removed known_hosts and reconnected and accepted. Did not keep track of before values unfortunately. Key has been the same ed25519 all the time

it adds 3 lines to known hosts:
192.168.1.2 ssh-ed25519
192.168.1.2 ssh-rsa
192.168.1.2 ecdsa-sha2-nistp256

and that is working fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. macos MacOS (OSX) related remote Problem is in podman-remote
Projects
None yet
Development

No branches or pull requests

4 participants