Log SSH client used

Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
This commit is contained in:
Nathan LeClaire 2015-12-18 17:26:26 -08:00
parent 80c9f5bbd9
commit e143ef730c
1 changed files with 9 additions and 3 deletions

View File

@ -76,16 +76,22 @@ func NewClient(user string, host string, port int, auth *Auth) (Client, error) {
sshBinaryPath, err := exec.LookPath("ssh")
if err != nil {
log.Debug("SSH binary not found, using native Go implementation")
return NewNativeClient(user, host, port, auth)
client, err := NewNativeClient(user, host, port, auth)
log.Debug(client)
return client, err
}
if defaultClientType == Native {
log.Debug("Using SSH client type: native")
return NewNativeClient(user, host, port, auth)
client, err := NewNativeClient(user, host, port, auth)
log.Debug(client)
return client, err
}
log.Debug("Using SSH client type: external")
return NewExternalClient(sshBinaryPath, user, host, port, auth)
client, err := NewExternalClient(sshBinaryPath, user, host, port, auth)
log.Debug(client)
return client, err
}
func NewNativeClient(user, host string, port int, auth *Auth) (Client, error) {