mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-10-27 14:09:58 -04:00
Add 3-second timeout for SSH connection attempts
This commit is contained in:
1 parent
4ca97834f4
commit
5028fb21b0
1 file changed
+1
@@ -93,6 +93,7 @@ func GetSSHClient(manualSync bool) (*ssh.Client, string, bool) {
|
|||||||
ssh.PublicKeys(parsedKey),
|
ssh.PublicKeys(parsedKey),
|
||||||
},
|
},
|
||||||
HostKeyCallback: hostKeyCallback,
|
HostKeyCallback: hostKeyCallback,
|
||||||
|
Timeout: 3 * time.Second,
|
||||||
}
|
}
|
||||||
|
|
||||||
// connect to SSH server
|
// connect to SSH server
|
||||||
|
|||||||
Reference in new issue
Block a user