diff options
author | Brent Baude <bbaude@redhat.com> | 2020-03-19 16:50:15 -0500 |
---|---|---|
committer | Brent Baude <bbaude@redhat.com> | 2020-03-20 12:54:45 -0500 |
commit | 87293028e61d0c88c258ed9f4a82c4be7f0bc896 (patch) | |
tree | cd3c6f35eed940e41afed71e7f60f7a8abac1612 /pkg/bindings/connection.go | |
parent | ccc30c606e843d5c98e2c62a3b393a61e60976b2 (diff) | |
download | podman-87293028e61d0c88c258ed9f4a82c4be7f0bc896.tar.gz podman-87293028e61d0c88c258ed9f4a82c4be7f0bc896.tar.bz2 podman-87293028e61d0c88c258ed9f4a82c4be7f0bc896.zip |
podmanv2 container exists|wait
enable container exists and wait for podmanv2
Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/bindings/connection.go')
-rw-r--r-- | pkg/bindings/connection.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pkg/bindings/connection.go b/pkg/bindings/connection.go index 289debd8c..4fe4dd72d 100644 --- a/pkg/bindings/connection.go +++ b/pkg/bindings/connection.go @@ -165,8 +165,13 @@ func sshClient(_url *url.URL, identity string, secure bool) (*http.Client, error } } + port := _url.Port() + if port == "" { + port = "22" + } + bastion, err := ssh.Dial("tcp", - net.JoinHostPort(_url.Hostname(), _url.Port()), + net.JoinHostPort(_url.Hostname(), port), &ssh.ClientConfig{ User: _url.User.Username(), Auth: []ssh.AuthMethod{auth}, |