Skip to content

Commit

Permalink
🐛 add ssh agent credentials for os ssh connection
Browse files Browse the repository at this point in the history
  • Loading branch information
vjeffrey committed Sep 14, 2023
1 parent 00d1532 commit a107f10
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion providers/os/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ func (s *Service) ParseCLI(req *plugin.ParseCLIReq) (*plugin.ParseCLIRes, error)
user = x.User.Username()
conf.Host = x.Hostname()
conf.Path = x.Path

if sPort := x.Port(); sPort != "" {
port, err = strconv.Atoi(x.Port())
if err != nil {
Expand Down Expand Up @@ -145,6 +144,8 @@ func (s *Service) ParseCLI(req *plugin.ParseCLIReq) (*plugin.ParseCLIRes, error)
conf.Path = string(x.Value)
}

conf.Credentials = append(conf.Credentials, &vault.Credential{Type: vault.CredentialType_ssh_agent, User: user})

asset := &inventory.Asset{
Connections: []*inventory.Config{conf},
}
Expand Down

0 comments on commit a107f10

Please sign in to comment.