TestClientAuthThirdKey checks that the third configured can succeed. If we were to do three attempts for each key (rsa-sha2-256, rsa-sha2-512, ssh-rsa), we'd hit the six maximum attempts before reaching it.
(t *testing.T)
| 155 | // were to do three attempts for each key (rsa-sha2-256, rsa-sha2-512, ssh-rsa), |
| 156 | // we'd hit the six maximum attempts before reaching it. |
| 157 | func TestClientAuthThirdKey(t *testing.T) { |
| 158 | config := &ClientConfig{ |
| 159 | User: "testuser", |
| 160 | Auth: []AuthMethod{ |
| 161 | PublicKeys(testSigners["rsa-openssh-format"], |
| 162 | testSigners["rsa-openssh-format"], testSigners["rsa"]), |
| 163 | }, |
| 164 | HostKeyCallback: InsecureIgnoreHostKey(), |
| 165 | } |
| 166 | if err := tryAuth(t, config); err != nil { |
| 167 | t.Fatalf("unable to dial remote side: %s", err) |
| 168 | } |
| 169 | } |
| 170 | |
| 171 | func TestAuthMethodPassword(t *testing.T) { |
| 172 | config := &ClientConfig{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…