Compare commits
	
		
			2 Commits
		
	
	
		
			2f73df73b1
			...
			b25c7ea5ea
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| b25c7ea5ea | |||
| 59c2c028c8 | 
@@ -9,6 +9,7 @@ import (
 | 
			
		||||
	"os/user"
 | 
			
		||||
	"path/filepath"
 | 
			
		||||
	"strings"
 | 
			
		||||
	"time"
 | 
			
		||||
 | 
			
		||||
	"github.com/kevinburke/ssh_config"
 | 
			
		||||
	"golang.org/x/crypto/ssh"
 | 
			
		||||
@@ -106,13 +107,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 {
 | 
			
		||||
					continue
 | 
			
		||||
					// panic(fmt.Errorf("error when connecting to host %s: %w", host, connectErr))
 | 
			
		||||
					panic(fmt.Errorf("error when connecting to host %s: %w", host, connectErr))
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
			break
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user