From 44e78b278b181e7de5f3f8252ab146f23127d3eb Mon Sep 17 00:00:00 2001 From: Boshi Lian Date: Fri, 15 Sep 2023 01:52:04 +0000 Subject: [PATCH] expose non auth --- ssh/client_auth.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ssh/client_auth.go b/ssh/client_auth.go index 409b5ea1d4..00cf5e31c5 100644 --- a/ssh/client_auth.go +++ b/ssh/client_auth.go @@ -146,6 +146,11 @@ func (n *noneAuth) method() string { return "none" } +// None return an AuthMethod using "none" authentication defined in RFC 4252 section 5.2. +func None() AuthMethod { + return new(noneAuth) +} + // passwordCallback is an AuthMethod that fetches the password through // a function call, e.g. by prompting the user. type passwordCallback func() (password string, err error)