Open bmenant opened 3 months ago
We use the native golang ssh implementation and do not call the ssh binary for the remote connection so this is impossible at least for the normal ssh based remote API. I am not sure if scp or farm shell out to ssh but I don't think so.
I know we had some efforts to allow using the ssh binary directly as proxy but I am not sure if this was ever properly finished or is even working at all. It looks like it got a root level option at least --ssh=native
vs --ssh=golang
(default) so if that works then I could see the point in the feature request but if not than the ssh native mode would need to be fixed first before this could be considered.
The global option --ssh=native
is documented, but it looks like its implementation is incomplete:
$ podman --log-level=debug --ssh=native system connection add dev1 user@remote_host"
INFO[0000] podman filtering at log level debug
Error: exit status 255
DEBU[0000] Shutting down engines
A friendly reminder that this issue had no activity for 30 days.
Feature request description
On a Linux host, some Podman commands open ssh connections to remote machines, notably: podman_system_connection, podman_farm, podman_machine and podman_image_scp to name a few.
However, beside
--identity
and--port
(and ssh-agent support), it is difficult to provide additional configuration to the ssh client on a per command/project basis.It would be convenient if Podman connections supported additional ssh common arguments.
Suggest potential solution
Add a
--ssh-args
option to commands relying on ssh connections, and pass those to the underlying ssh client.For example:
Have you considered any alternatives?
~/.ssh/config
can be difficult to set up and error prone when several projects coexist with conflicting options.Additional context
This is especially useful on a workstation with several projects having different ssh configuration files with specific directives (e.g. ProxyJump).
Ansible has a variable
ansible_ssh_common_args
for example. Podman lacks this feature.