Compare commits
No commits in common. "b25c7ea5ea881b9be4a3c7da9439e6e36650052a" and "2f73df73b1c2431ed6679308374f97f58950157c" have entirely different histories.
b25c7ea5ea
...
2f73df73b1
@ -9,7 +9,6 @@ import (
|
||||
"os/user"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/kevinburke/ssh_config"
|
||||
"golang.org/x/crypto/ssh"
|
||||
@ -107,13 +106,13 @@ func (remoteConfig *Host) ConnectToSSHHost() (*ssh.Client, error) {
|
||||
User: remoteConfig.User,
|
||||
Auth: []ssh.AuthMethod{ssh.PublicKeys(signer)},
|
||||
HostKeyCallback: ssh.FixedHostKey(hostKey),
|
||||
Timeout: 5 * time.Second,
|
||||
}
|
||||
for _, host := range remoteConfig.HostName {
|
||||
println("Connecting to " + host)
|
||||
sshClient, connectErr = ssh.Dial("tcp", host, sshConfig)
|
||||
if connectErr != nil {
|
||||
panic(fmt.Errorf("error when connecting to host %s: %w", host, connectErr))
|
||||
continue
|
||||
// panic(fmt.Errorf("error when connecting to host %s: %w", host, connectErr))
|
||||
}
|
||||
}
|
||||
break
|
||||
|
Loading…
Reference in New Issue
Block a user