MCPcopy Index your code
hub / github.com/tailscale/tailscale / TestClientAuthThirdKey

Function TestClientAuthThirdKey

tempfork/sshtest/ssh/client_auth_test.go:157–169  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
157func 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
171func TestAuthMethodPassword(t *testing.T) {
172 config := &ClientConfig{

Callers

nothing calls this directly

Calls 4

PublicKeysFunction · 0.85
InsecureIgnoreHostKeyFunction · 0.85
tryAuthFunction · 0.85
FatalfMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…