X Tutup
Skip to content

Commit e143ef7

Browse files
Log SSH client used
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
1 parent 80c9f5b commit e143ef7

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

libmachine/ssh/client.go

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,22 @@ func NewClient(user string, host string, port int, auth *Auth) (Client, error) {
7676
sshBinaryPath, err := exec.LookPath("ssh")
7777
if err != nil {
7878
log.Debug("SSH binary not found, using native Go implementation")
79-
return NewNativeClient(user, host, port, auth)
79+
client, err := NewNativeClient(user, host, port, auth)
80+
log.Debug(client)
81+
return client, err
8082
}
8183

8284
if defaultClientType == Native {
8385
log.Debug("Using SSH client type: native")
84-
return NewNativeClient(user, host, port, auth)
86+
client, err := NewNativeClient(user, host, port, auth)
87+
log.Debug(client)
88+
return client, err
8589
}
8690

8791
log.Debug("Using SSH client type: external")
88-
return NewExternalClient(sshBinaryPath, user, host, port, auth)
92+
client, err := NewExternalClient(sshBinaryPath, user, host, port, auth)
93+
log.Debug(client)
94+
return client, err
8995
}
9096

9197
func NewNativeClient(user, host string, port int, auth *Auth) (Client, error) {

0 commit comments

Comments
 (0)
X Tutup