From cfc9dc28783db4dac3569edaa4ada5f00cf60471 Mon Sep 17 00:00:00 2001 From: Pascal Breuninger Date: Tue, 4 Jun 2024 18:35:50 +0200 Subject: [PATCH] fix: add custom port to windows command execution --- pkg/ssh/ssh.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/ssh/ssh.go b/pkg/ssh/ssh.go index ba551dd..bd1ea1f 100644 --- a/pkg/ssh/ssh.go +++ b/pkg/ssh/ssh.go @@ -100,6 +100,9 @@ func execSSHCommand(provider *SSHProvider, command string, output io.Writer) err return fmt.Errorf("read identifiyfile: %w", err) } + if provider.Config.Port != "" { + port = provider.Config.Port + } // create ssh session addr := net.JoinHostPort(hostname, port) client, err := ssh.NewSSHClient(user, addr, key)