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 ignores .ssh/config in remote connection mode #21916

Closed
mancubus77 opened this issue Mar 2, 2024 · 3 comments
Closed

Podman ignores .ssh/config in remote connection mode #21916

mancubus77 opened this issue Mar 2, 2024 · 3 comments
Labels
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

Comments

@mancubus77
Copy link

Issue Description

My remote podman server sits behind few jump boxes, therefore I use .ssh/config to get there:
mac --> [jump1] --> [rhel+podman]

Despite entry in .ssh/config podman ignores it, and tries to connect directly to with provided host:

❯ podman --log-level=debug system connection add mosdev ssh://jump1
INFO[0000] podman filtering at log level debug
DEBU[0000] Found SSH_AUTH_SOCK "/private/tmp/com.apple.launchd.thyp42SkEk/Listeners", ssh-agent signer enabled
Error: failed to connect: dial tcp: lookup jump1: no such host
DEBU[0000] Shutting down engines
❯ ssh jump1 -v
OpenSSH_9.4p1, LibreSSL 3.3.6
......
user@jump1:~$

Is this a bug, or feature?

DEBUG INFO:

❯ podman version
Client:       Podman Engine
Version:      4.9.2
API Version:  4.9.2
Go Version:   go1.21.6
Git Commit:   f9a48ebcfa9a39144be0f86f4ba842752835f945
Built:        Sat Feb  3 10:35:11 2024
OS/Arch:      darwin/amd64

Server:       Podman Engine
Version:      4.8.2
API Version:  4.8.2
Go Version:   go1.20.11
Built:        Tue Dec 12 00:23:53 2023
OS/Arch:      linux/amd64
❯ podman info
host:
  arch: amd64
  buildahVersion: 1.33.2
  cgroupControllers:
  - cpu
  - memory
  - pids
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.1.8-2.fc38.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.8, commit: '
  cpuUtilization:
    idlePercent: 99.94
    systemPercent: 0.06
    userPercent: 0
  cpus: 2
  databaseBackend: sqlite
  distribution:
    distribution: fedora
    version: "38"
  eventLogger: journald
  freeLocks: 2003
  hostname: fedora38.localdomain
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 524288
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 524288
      size: 65536
  kernel: 6.6.9-100.fc38.x86_64
  linkmode: dynamic
  logDriver: journald
  memFree: 1395752960
  memTotal: 2060525568
  networkBackend: netavark
  networkBackendInfo:
    backend: netavark
    dns:
      package: aardvark-dns-1.9.0-1.fc38.x86_64
      path: /usr/libexec/podman/aardvark-dns
      version: aardvark-dns 1.9.0
    package: netavark-1.9.0-1.fc38.x86_64
    path: /usr/libexec/podman/netavark
    version: netavark 1.9.0
  ociRuntime:
    name: crun
    package: crun-1.12-1.fc38.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 1.12
      commit: ce429cb2e277d001c2179df1ac66a470f00802ae
      rundir: /run/user/1000/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^20231204.gb86afe3-1.fc38.x86_64
    version: |
      pasta 0^20231204.gb86afe3-1.fc38.x86_64
      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: /run/user/1000/podman/podman.sock
  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: true
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: true
  serviceIsRemote: true
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.2.2-1.fc38.x86_64
    version: |-
      slirp4netns version 1.2.2
      commit: 0ee2d87523e906518d34a6b423271e4826f71faf
      libslirp: 4.7.0
      SLIRP_CONFIG_VERSION_MAX: 4
      libseccomp: 2.5.3
  swapFree: 4207927296
  swapTotal: 4207927296
  uptime: 74h 15m 8.00s (Approximately 3.08 days)
  variant: ""
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - docker.io
  - quay.io
store:
  configFile: /home/vagrant/.config/containers/storage.conf
  containerStore:
    number: 3
    paused: 0
    running: 0
    stopped: 3
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /home/vagrant/.local/share/containers/storage
  graphRootAllocated: 134146424832
  graphRootUsed: 33608777728
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Supports shifting: "false"
    Supports volatile: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 286
  runRoot: /run/user/1000/containers
  transientStore: false
  volumePath: /home/vagrant/.local/share/containers/storage/volumes
version:
  APIVersion: 4.8.2
  Built: 1702301033
  BuiltTime: Mon Dec 11 13:23:53 2023
  GitCommit: ""
  GoVersion: go1.20.11
  Os: linux
  OsArch: linux/amd64
  Version: 4.8.2

Steps to reproduce the issue

Steps to reproduce the issue
1.
2.
3.

Describe the results you received

Describe the results you received

Describe the results you expected

Describe the results you expected

podman info output

If you are unable to run podman info for any reason, please provide the podman version, operating system and its version and the architecture you are running.

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

@mancubus77 mancubus77 added the kind/bug Categorizes issue or PR as related to a bug. label Mar 2, 2024
@github-actions github-actions bot added macos MacOS (OSX) related remote Problem is in podman-remote labels Mar 2, 2024
@afbjorklund
Copy link
Contributor

afbjorklund commented Mar 2, 2024

Missing feature, podman uses a custom system connection for connecting to remote hosts instead.

It only supports identity.

There was a similar issue when trying to use a custom alias (but only translating the host name to use):

@mancubus77
Copy link
Author

duplicates #21113

@afbjorklund
Copy link
Contributor

afbjorklund commented Mar 4, 2024

The current workaround, as required by e.g. Podman Desktop, is to tunnel the socket yourself with ssh.

@stale-locking-app stale-locking-app bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Jun 3, 2024
@stale-locking-app stale-locking-app bot locked as resolved and limited conversation to collaborators Jun 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
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
Projects
None yet
Development

No branches or pull requests

2 participants