Skip to content

Commit

Permalink
set username only based on port
Browse files Browse the repository at this point in the history
  • Loading branch information
samlhuillier committed Aug 30, 2023
1 parent 7a43125 commit 564aff1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/ssh/sshconfigurer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 564aff1

Please sign in to comment.