podman: podman machine fails when ~/.ssh/config contains mac content
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
podman machine fails with 255 when ~/.ssh/config contains Mac related content:
Host github.com
IgnoreUnknown AddKeysToAgent,UseKeychain
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/github
Steps to reproduce the issue:
-
Create a ssh config like the above
-
podman machine start (see error)
-
podman machine ssh (see error complaining about config)
Describe the results you received:
➜ ~ podman machine start
Starting machine “podman-machine-default”
Waiting for VM …
Mounting volume… /Users/gahealy:/Users/gahealy
Error: exit status 255
➜ ~ podman machine list
NAME VM TYPE CREATED LAST UP CPUS MEMORY DISK SIZE
podman-machine-default* qemu 7 minutes ago Currently running 1 2.147GB 107.4GB
➜ ~ podman machine ssh
Connecting to vm podman-machine-default. To close connection, use ~. or exit
/Users/gahealy/.ssh/config: line 4: Bad configuration option: usekeychain
/Users/gahealy/.ssh/config: line 10: Bad configuration option: usekeychain
/Users/gahealy/.ssh/config: line 16: Bad configuration option: usekeychain
/Users/gahealy/.ssh/config: terminating, 3 bad configuration options
Error: exit status 255
Describe the results you expected:
google suggests using IgnoreUnknown should fix the error - git for example, follows this. I’d expect podman to follow the same idea.
Additional information you deem important (e.g. issue happens only occasionally):
Output of podman version:
Client: Podman Engine
Version: 4.1.0
API Version: 4.1.0
Go Version: go1.18.1
Built: Thu May 5 21:07:47 2022
OS/Arch: darwin/arm64
Server: Podman Engine
Version: 4.1.0
API Version: 4.1.0
Go Version: go1.18
Built: Fri May 6 17:16:38 2022
OS/Arch: linux/arm64
Output of podman info --debug:
host:
arch: arm64
buildahVersion: 1.26.1
cgroupControllers:
- cpu
- io
- memory
- pids
cgroupManager: systemd
cgroupVersion: v2
conmon:
package: conmon-2.1.0-2.fc36.aarch64
path: /usr/bin/conmon
version: 'conmon version 2.1.0, commit: '
cpuUtilization:
idlePercent: 97.67
systemPercent: 1.74
userPercent: 0.59
cpus: 1
distribution:
distribution: fedora
variant: coreos
version: "36"
eventLogger: journald
hostname: localhost.localdomain
idMappings:
gidmap:
- container_id: 0
host_id: 1000
size: 1
- container_id: 1
host_id: 100000
size: 1000000
uidmap:
- container_id: 0
host_id: 501
size: 1
- container_id: 1
host_id: 100000
size: 1000000
kernel: 5.17.5-300.fc36.aarch64
linkmode: dynamic
logDriver: journald
memFree: 1682010112
memTotal: 2052694016
networkBackend: netavark
ociRuntime:
name: crun
package: crun-1.4.4-1.fc36.aarch64
path: /usr/bin/crun
version: |-
crun version 1.4.4
commit: 6521fcc5806f20f6187eb933f9f45130c86da230
spec: 1.0.0
+SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
os: linux
remoteSocket:
exists: true
path: /run/user/501/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.0-0.2.beta.0.fc36.aarch64
version: |-
slirp4netns version 1.2.0-beta.0
commit: 477db14a24ff1a3de3a705e51ca2c4c1fe3dda64
libslirp: 4.6.1
SLIRP_CONFIG_VERSION_MAX: 3
libseccomp: 2.5.3
swapFree: 0
swapTotal: 0
uptime: 4m 50.97s
plugins:
log:
- k8s-file
- none
- passthrough
- journald
network:
- bridge
- macvlan
volume:
- local
registries:
search:
- docker.io
store:
configFile: /var/home/core/.config/containers/storage.conf
containerStore:
number: 0
paused: 0
running: 0
stopped: 0
graphDriverName: overlay
graphOptions: {}
graphRoot: /var/home/core/.local/share/containers/storage
graphRootAllocated: 106825756672
graphRootUsed: 2271117312
graphStatus:
Backing Filesystem: xfs
Native Overlay Diff: "true"
Supports d_type: "true"
Using metacopy: "false"
imageCopyTmpDir: /var/tmp
imageStore:
number: 0
runRoot: /run/user/501/containers
volumePath: /var/home/core/.local/share/containers/storage/volumes
version:
APIVersion: 4.1.0
Built: 1651853798
BuiltTime: Fri May 6 17:16:38 2022
GitCommit: ""
GoVersion: go1.18
Os: linux
OsArch: linux/arm64
Version: 4.1.0
Package info (e.g. output of rpm -q podman or apt list podman):
brew list podman
/opt/homebrew/Cellar/podman/4.1.0/bin/podman
/opt/homebrew/Cellar/podman/4.1.0/bin/podman-mac-helper
/opt/homebrew/Cellar/podman/4.1.0/bin/podman-remote
/opt/homebrew/Cellar/podman/4.1.0/etc/bash_completion.d/podman
/opt/homebrew/Cellar/podman/4.1.0/libexec/gvproxy
/opt/homebrew/Cellar/podman/4.1.0/share/fish/vendor_completions.d/podman.fish
/opt/homebrew/Cellar/podman/4.1.0/share/man/ (163 files)
/opt/homebrew/Cellar/podman/4.1.0/share/zsh/site-functions/_podman
Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
No
Additional environment details (AWS, VirtualBox, physical, etc.):
MacOS M1
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 3
- Comments: 19 (4 by maintainers)
Ahh, got you. I somehow missed the start of your original message and just focused on the exit status part.
Your problem is that
sshparses the entireconfigfile but only on the odd chance that there will be another section which is more specific than the one it’s currently set to use, and yet some directives are ignored in that context because it already has a host match - so basically it is complaining about unknown content, even if it doesn’t apply to its current config in any way.Move the
IgnoreUnknownto the top of the file, even before the firstHostsection. You only need it once.Obtain the port of your machine as I’ve shown above, then do try the following and paste the output here:
Just noting that I seemed to have this problem until I restarted my Mac:
Then, after restart:
I have no idea why.