summaryrefslogtreecommitdiff
path: root/cmd/podman/images/scp.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-02-03 10:05:22 -0500
committerGitHub <noreply@github.com>2022-02-03 10:05:22 -0500
commit722ccaee38663a0087c1c217319235e0d1460b1e (patch)
tree8a51712634720593adbb095094e30d0a6b3813c6 /cmd/podman/images/scp.go
parent08930b24b98b31ea4f1ce882a45166b469b28ced (diff)
parent56d95172f185e1b480453e66184fd55b897b0a36 (diff)
downloadpodman-722ccaee38663a0087c1c217319235e0d1460b1e.tar.gz
podman-722ccaee38663a0087c1c217319235e0d1460b1e.tar.bz2
podman-722ccaee38663a0087c1c217319235e0d1460b1e.zip
Merge pull request #13047 from cdoern/scpSyntax
podman image scp syntax correction
Diffstat (limited to 'cmd/podman/images/scp.go')
-rw-r--r--cmd/podman/images/scp.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/cmd/podman/images/scp.go b/cmd/podman/images/scp.go
index 81dcda123..d07a5d99d 100644
--- a/cmd/podman/images/scp.go
+++ b/cmd/podman/images/scp.go
@@ -146,6 +146,17 @@ func scp(cmd *cobra.Command, args []string) (finalErr error) {
return err
}
+ allLocal := true // if we are all localhost, do not validate connections but if we are using one localhost and one non we need to use sshd
+ for _, val := range cliConnections {
+ if !strings.Contains(val, "@localhost::") {
+ allLocal = false
+ break
+ }
+ }
+ if allLocal {
+ cliConnections = []string{}
+ }
+
var serv map[string]config.Destination
serv, err = GetServiceInformation(cliConnections, cfg)
if err != nil {