diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-09-18 21:12:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-18 21:12:04 +0200 |
commit | 8133aa1ee88cea2c89d38c1c56974c8889ef0933 (patch) | |
tree | 95e2cbc29508cd9e40d5bbee200f83fbc4ad1747 /pkg/adapter/client_unix.go | |
parent | 2c51d6f800a1ed472da3b88b4f987ab73953c8d0 (diff) | |
parent | 0d9b952aeab95c59b28bcea42f719d06363b45b5 (diff) | |
download | podman-8133aa1ee88cea2c89d38c1c56974c8889ef0933.tar.gz podman-8133aa1ee88cea2c89d38c1c56974c8889ef0933.tar.bz2 podman-8133aa1ee88cea2c89d38c1c56974c8889ef0933.zip |
Merge pull request #4041 from baude/remoteconfigport
support non-standard ssh port for remote-client
Diffstat (limited to 'pkg/adapter/client_unix.go')
-rw-r--r-- | pkg/adapter/client_unix.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pkg/adapter/client_unix.go b/pkg/adapter/client_unix.go index 4781acd06..a7bc7c1c0 100644 --- a/pkg/adapter/client_unix.go +++ b/pkg/adapter/client_unix.go @@ -10,7 +10,11 @@ import ( ) func formatDefaultBridge(remoteConn *remoteclientconfig.RemoteConnection, logLevel string) string { + port := remoteConn.Port + if port == 0 { + port = 22 + } return fmt.Sprintf( - `ssh -T %s@%s -- /usr/bin/varlink -A \'/usr/bin/podman --log-level=%s varlink \\\$VARLINK_ADDRESS\' bridge`, - remoteConn.Username, remoteConn.Destination, logLevel) + `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) } |