From c45b537b3fd2470f0514d018b2cb983a694c617e Mon Sep 17 00:00:00 2001 From: Andrew Woodlee Date: Mon, 2 Jan 2023 12:51:05 -0600 Subject: [PATCH] debug info --- pkg/backy/ssh.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/backy/ssh.go b/pkg/backy/ssh.go index 4984b08..c7ff1c5 100644 --- a/pkg/backy/ssh.go +++ b/pkg/backy/ssh.go @@ -75,12 +75,11 @@ func (remoteConfig *Host) ConnectToSSHHost() (*ssh.Client, error) { } remoteConfig.HostName, _ = cfg.GetAll(remoteConfig.Host, "HostName") if remoteConfig.HostName == nil { - remoteConfig.HostName[0] = remoteConfig.Host port, _ := cfg.Get(remoteConfig.Host, "Port") if port == "" { port = "22" } - remoteConfig.HostName[0] = remoteConfig.HostName[0] + ":" + port + remoteConfig.HostName[0] = remoteConfig.Host + ":" + port } else { for index, hostName := range remoteConfig.HostName { port, _ := cfg.Get(remoteConfig.Host, "Port") @@ -88,6 +87,7 @@ func (remoteConfig *Host) ConnectToSSHHost() (*ssh.Client, error) { port = "22" } remoteConfig.HostName[index] = hostName + ":" + port + println("HostName: " + remoteConfig.HostName[0]) } } privateKey, err := os.ReadFile(remoteConfig.PrivateKeyPath)