From f4de46ab3aa8e9b4c4b4ea3f9431714157cb6abd Mon Sep 17 00:00:00 2001 From: tmonty12 Date: Mon, 18 Nov 2024 14:06:37 -0800 Subject: [PATCH] properly attacher hostuser to proxy command --- pkg/ssh/sshconfigurer.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/ssh/sshconfigurer.go b/pkg/ssh/sshconfigurer.go index d93931bb4..313a4a189 100644 --- a/pkg/ssh/sshconfigurer.go +++ b/pkg/ssh/sshconfigurer.go @@ -341,16 +341,16 @@ func makeSSHConfigEntryV2(workspace entity.Workspace, privateKeyPath string, clo alias = fmt.Sprintf("%s-host", alias) var hostSSHVal string + hostport := workspace.GetHostSSHPort() + hostuser := workspace.GetHostSSHUser() if workspace.HostSSHProxyHostname == "" { - port := workspace.GetHostSSHPort() - user = workspace.GetHostSSHUser() entry := SSHConfigEntryV2{ Alias: alias, IdentityFile: privateKeyPath, - User: user, + User: hostuser, Dir: workspace.GetProjectFolderPath(), HostName: hostname, - Port: port, + Port: hostport, } tmpl, err := template.New(alias).Parse(SSHConfigEntryTemplateV3) if err != nil { @@ -365,7 +365,7 @@ func makeSSHConfigEntryV2(workspace entity.Workspace, privateKeyPath string, clo entry := SSHConfigEntryV2{ Alias: alias, IdentityFile: privateKeyPath, - User: user, + User: hostuser, ProxyCommand: proxyCommand, Dir: workspace.GetProjectFolderPath(), }