ssh

package
v0.0.0-...-cb4fbb6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthenticationMiddleware

func AuthenticationMiddleware(sh ssh.Handler) ssh.Handler

func PublicKeyHandler

func PublicKeyHandler(ctx ssh.Context, pk ssh.PublicKey) (allowed bool)

func SessionHandler

func SessionHandler(s ssh.Session) *tea.Program

Our bubble tea session handler

Types

type SSHServer

type SSHServer struct {
	// contains filtered or unexported fields
}

func NewSSHServer

func NewSSHServer(ctx context.Context) (*SSHServer, error)

Server is the SSH Server

func (*SSHServer) Close

func (s *SSHServer) Close() error

Close closes the SSH server.

func (*SSHServer) ListenAndServe

func (s *SSHServer) ListenAndServe() error

ListenAndServe starts the SSH server.

func (*SSHServer) Serve

func (s *SSHServer) Serve(l net.Listener) error

Serve starts the SSH server on the given net.Listener.

func (*SSHServer) Shutdown

func (s *SSHServer) Shutdown(ctx context.Context) error

Shutdown gracefully shuts down the SSH server.

type UI

type UI struct {
	Renderer *lipgloss.Renderer
	// contains filtered or unexported fields
}

func NewUI

func NewUI(ctx context.Context, renderer *lipgloss.Renderer, width int, height int) *UI

func (*UI) Init

func (ui *UI) Init() tea.Cmd

Init implements tea.Model.

func (*UI) Update

func (ui *UI) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*UI) View

func (ui *UI) View() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL