diff options
Diffstat (limited to 'cmd/podman/images')
-rw-r--r-- | cmd/podman/images/scp.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cmd/podman/images/scp.go b/cmd/podman/images/scp.go index a7aa43e61..18899d251 100644 --- a/cmd/podman/images/scp.go +++ b/cmd/podman/images/scp.go @@ -4,6 +4,7 @@ import ( "os" "strings" + "github.com/containers/common/pkg/ssh" "github.com/containers/podman/v4/cmd/podman/common" "github.com/containers/podman/v4/cmd/podman/registry" "github.com/spf13/cobra" @@ -48,6 +49,11 @@ func scp(cmd *cobra.Command, args []string) (finalErr error) { var ( err error ) + + containerConfig := registry.PodmanConfig() + + sshType := containerConfig.SSHMode + for i, val := range os.Args { if val == "image" { break @@ -67,7 +73,8 @@ func scp(cmd *cobra.Command, args []string) (finalErr error) { dst = args[1] } - err = registry.ImageEngine().Scp(registry.Context(), src, dst, parentFlags, quiet) + sshEngine := ssh.DefineMode(sshType) + err = registry.ImageEngine().Scp(registry.Context(), src, dst, parentFlags, quiet, sshEngine) if err != nil { return err } |