support non-standard ssh port for remote-client

when using the remote client, users may need to specify a non-standard
port for ssh connections.  we can do so on the command line and within
the remote-client configuration file.

Fixes: #3987

Signed-off-by: baude <bbaude@redhat.com>
This commit is contained in:
baude
2019-09-16 10:48:34 -05:00
parent 143caa98bf
commit 0d9b952aea
10 changed files with 48 additions and 6 deletions

View File

@ -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)
}