diff --git a/pkg/ssh/sshconfigurer.go b/pkg/ssh/sshconfigurer.go index 0dc3089e..c3a7297c 100644 --- a/pkg/ssh/sshconfigurer.go +++ b/pkg/ssh/sshconfigurer.go @@ -280,12 +280,12 @@ func makeSSHConfigEntryV2(workspace entity.Workspace, privateKeyPath string) (st } else { hostname := workspace.GetHostname() var userName string - if workspace.VerbYaml != "" { - userName = "root" - } else { + port := workspace.GetPort() + if port == 22 { userName = "ubuntu" + } else { + userName = "root" } - port := workspace.GetPort() entry = SSHConfigEntryV2{ Alias: alias, IdentityFile: privateKeyPath,