Skip to content

Commit

Permalink
Merge pull request #29 from loft-sh/fix/windows-port
Browse files Browse the repository at this point in the history
fix: add custom port to windows command execution
  • Loading branch information
pascalbreuninger authored Jun 4, 2024
2 parents a9c6447 + cfc9dc2 commit bd240fb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/ssh/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit bd240fb

Please sign in to comment.