correct parse the identyfile and allow remove tags

This commit is contained in:
Adem Baccara
2025-09-10 21:59:46 +01:00
parent b71ef74aaa
commit bb5b7554e6
8 changed files with 69 additions and 177 deletions
+2 -2
View File
@@ -124,8 +124,8 @@ func BuildSSHCommand(s domain.Server) string {
if s.Port != 0 && s.Port != 22 {
parts = append(parts, "-p", fmt.Sprintf("%d", s.Port))
}
if s.Key != "" {
parts = append(parts, "-i", quoteIfNeeded(s.Key))
if len(s.IdentityFiles) > 0 {
parts = append(parts, "-i", quoteIfNeeded(s.IdentityFiles[0]))
}
return strings.Join(parts, " ")
}