Fixed typo Passpharse => Passphrase #2

Thanks for reporting.
This commit is contained in:
NI
2019-08-13 17:37:06 +08:00
parent 36ee034bcf
commit 5e6a774bd8
4 changed files with 28 additions and 28 deletions

View File

@@ -62,7 +62,7 @@ const (
// Auth methods
const (
SSHAuthMethodNone byte = 0x00
SSHAuthMethodPasspharse byte = 0x01
SSHAuthMethodPassphrase byte = 0x01
SSHAuthMethodPrivateKey byte = 0x02
)
@@ -205,7 +205,7 @@ func (d *sshClient) buildAuthMethod(
return nil
}, nil
case SSHAuthMethodPasspharse:
case SSHAuthMethodPassphrase:
return func(b []byte) []ssh.AuthMethod {
return []ssh.AuthMethod{
ssh.PasswordCallback(func() (string, error) {
@@ -218,13 +218,13 @@ func (d *sshClient) buildAuthMethod(
return "", wErr
}
passpharseBytes, passpharseReceived := <-d.credentialReceive
passphraseBytes, passphraseReceived := <-d.credentialReceive
if !passpharseReceived {
if !passphraseReceived {
return "", ErrSSHAuthCancelled
}
return string(passpharseBytes), nil
return string(passphraseBytes), nil
}),
}
}, nil