From 02321870b5dc327768bbc58d40330232d01b7be4 Mon Sep 17 00:00:00 2001 From: Andrew Date: Sun, 12 Feb 2023 08:48:46 -0600 Subject: [PATCH] fix for remote host ports --- pkg/backy/ssh.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)