MCPcopy
hub / github.com/gliderlabs/ssh / ExamplePasswordAuth

Function ExamplePasswordAuth

example_test.go:16–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14}
15
16func ExamplePasswordAuth() {
17 ssh.ListenAndServe(":2222", nil,
18 ssh.PasswordAuth(func(ctx ssh.Context, pass string) bool {
19 return pass == "secret"
20 }),
21 )
22}
23
24func ExampleNoPty() {
25 ssh.ListenAndServe(":2222", nil, ssh.NoPty())

Callers

nothing calls this directly

Calls 2

ListenAndServeFunction · 0.92
PasswordAuthFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…