summaryrefslogtreecommitdiff
path: root/cmd/podman/images/scp.go
diff options
context:
space:
mode:
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 {