rename machines to connections in config

This commit is contained in:
Pavel Sviderski committed 2024-09-10 16:20:00 +10:00
1 parent ddf7d23351
commit 4e2640bbd2
4 files changed
+31 -17

No files matched your search

+3 -2
View File
@@ -33,8 +33,9 @@ func NewSSHDestination(user, host string, port int) SSHDestination {
}
func (d SSHDestination) Parse() (user string, host string, port int, err error) {
if strings.Contains(string(d), "@") {
user, host, _ = strings.Cut(string(d), "@")
host = string(d)
if strings.Contains(host, "@") {
user, host, _ = strings.Cut(host, "@")
}
h, p, sErr := net.SplitHostPort(host)
if sErr == nil {