Skip to content

Commit

Permalink
fix(be): SSH connecting with wrong username #1964
Browse files Browse the repository at this point in the history
  • Loading branch information
fiftin committed Apr 28, 2024
1 parent eed4586 commit 85f7d75
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion db/AccessKey.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ func (key *AccessKey) Install(usage AccessKeyRole, logger task_logger.Logger) (i
var agent ssh.Agent
agent, err = key.startSSHAgent(logger)
installation.SSHAgent = &agent
installation.Login = key.SshKey.Login
}
case AccessKeyRoleAnsiblePasswordVault:
if key.Type != AccessKeyLoginPassword {
Expand All @@ -148,7 +149,7 @@ func (key *AccessKey) Install(usage AccessKeyRole, logger task_logger.Logger) (i
var agent ssh.Agent
agent, err = key.startSSHAgent(logger)
installation.SSHAgent = &agent
installation.Login = key.LoginPassword.Login
installation.Login = key.SshKey.Login
case AccessKeyLoginPassword:
installation.Login = key.LoginPassword.Login
installation.Password = key.LoginPassword.Password
Expand Down

0 comments on commit 85f7d75

Please sign in to comment.