ssh/tailssh: add support for sending multiple banners
Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
@ -38,8 +38,7 @@ type Server struct {
|
||||
HostSigners []Signer // private keys for the host key, must have at least one
|
||||
Version string // server version to be sent before the initial handshake
|
||||
|
||||
KeyboardInteractiveHandler KeyboardInteractiveHandler // keyboard-interactive authentication handler
|
||||
BannerHandler BannerHandler
|
||||
KeyboardInteractiveHandler KeyboardInteractiveHandler // keyboard-interactive authentication handler
|
||||
PasswordHandler PasswordHandler // password authentication handler
|
||||
PublicKeyHandler PublicKeyHandler // public key authentication handler
|
||||
NoClientAuthHandler NoClientAuthHandler // no client authentication handler
|
||||
@ -171,12 +170,6 @@ func (srv *Server) config(ctx Context) *gossh.ServerConfig {
|
||||
return ctx.Permissions().Permissions, nil
|
||||
}
|
||||
}
|
||||
if srv.BannerHandler != nil {
|
||||
config.BannerCallback = func(conn gossh.ConnMetadata) string {
|
||||
applyConnMetadata(ctx, conn)
|
||||
return srv.BannerHandler(ctx)
|
||||
}
|
||||
}
|
||||
return config
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user