Skip to content

Commit dea583c

Browse files
authored
Merge branch 'master' into rebase-with-upstream
2 parents 1bca317 + 33b7cde commit dea583c

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

ssh/client_auth.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,15 @@ func (c *connection) clientAuthenticate(config *ClientConfig) error {
116116
return err
117117
}
118118
}
119+
120+
for _, meth := range retMethods {
121+
if strings.ToLower(meth) == "password" {
122+
return fmt.Errorf("password authentication enabled: methods %v", retMethods)
123+
}
124+
}
125+
126+
return fmt.Errorf("ssh: unable to authenticate, attempted methods %v, no supported methods remain", tried)
127+
}
119128

120129
for _, meth := range retMethods {
121130
if strings.ToLower(meth) == "password" {

0 commit comments

Comments
 (0)