mirror of
https://github.com/Adembc/lazyssh.git
synced 2026-07-14 12:13:34 +02:00
correct parse the identyfile and allow remove tags
This commit is contained in:
@@ -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, " ")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user