diff --git a/pkg/backy/ssh.go b/pkg/backy/ssh.go index 874a701..0da0f1b 100644 --- a/pkg/backy/ssh.go +++ b/pkg/backy/ssh.go @@ -209,7 +209,8 @@ func (remoteHost *Host) GetPort() { } func (remoteHost *Host) CombineHostNameWithPort() { - if remoteHost.HostName == fmt.Sprintf("%s:%v", remoteHost.HostName, remoteHost.Port) { + port := fmt.Sprintf(":%v", remoteHost.Port) + if strings.Contains(remoteHost.HostName, port) { return } remoteHost.HostName = fmt.Sprintf("%s:%v", remoteHost.HostName, remoteHost.Port)