summaryrefslogtreecommitdiff
path: root/pkg/adapter/client_unix.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-10-03 12:45:43 -0700
committerGitHub <noreply@github.com>2019-10-03 12:45:43 -0700
commit7af4074c6f96d0fabd2ab5dd6c5773053f80aa08 (patch)
tree804d6ca257d7c6649b1fda6ea6a00e3a06ab3bee /pkg/adapter/client_unix.go
parent86c8650c2328a4a611e614c7220627feae4d4eae (diff)
parentc831a64bb1dbce86109d1c2e00535e89a7fc5f81 (diff)
downloadpodman-7af4074c6f96d0fabd2ab5dd6c5773053f80aa08.tar.gz
podman-7af4074c6f96d0fabd2ab5dd6c5773053f80aa08.tar.bz2
podman-7af4074c6f96d0fabd2ab5dd6c5773053f80aa08.zip
Merge pull request #4161 from afbjorklund/machine-env
Handle environment variables from podman-machine
Diffstat (limited to 'pkg/adapter/client_unix.go')
-rw-r--r--pkg/adapter/client_unix.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/pkg/adapter/client_unix.go b/pkg/adapter/client_unix.go
index a7bc7c1c0..7af8b24c6 100644
--- a/pkg/adapter/client_unix.go
+++ b/pkg/adapter/client_unix.go
@@ -14,7 +14,14 @@ func formatDefaultBridge(remoteConn *remoteclientconfig.RemoteConnection, logLev
if port == 0 {
port = 22
}
+ options := ""
+ if remoteConn.IdentityFile != "" {
+ options += " -i " + remoteConn.IdentityFile
+ }
+ if remoteConn.IgnoreHosts {
+ options += " -q -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"
+ }
return fmt.Sprintf(
- `ssh -p %d -T %s@%s -- /usr/bin/varlink -A \'/usr/bin/podman --log-level=%s varlink \\\$VARLINK_ADDRESS\' bridge`,
- port, remoteConn.Username, remoteConn.Destination, logLevel)
+ `ssh -p %d -T%s %s@%s -- varlink -A \'podman --log-level=%s varlink \\\$VARLINK_ADDRESS\' bridge`,
+ port, options, remoteConn.Username, remoteConn.Destination, logLevel)
}