sshtest

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PrivateKey = `` /* 443-byte string literal not displayed */

notsecret

View Source
var PublicKey = `ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJfBviRTuS3BVn5rde9xQFrmylsHb8cJdpjuJJNVzMIj user@example.com`

Functions

func NullHandler

func NullHandler(ch ssh.Channel, in <-chan *ssh.Request)

func RequestReplyHandler

func RequestReplyHandler(t *testing.T, replies []RequestReply) func(ssh.Channel, <-chan *ssh.Request)

func TestPrivateKeyAsSlice

func TestPrivateKeyAsSlice() []byte

func TestPublicKey

func TestPublicKey() ssh.PublicKey

func TestPublicKeyAsSlice

func TestPublicKeyAsSlice() []byte

func TestSigner

func TestSigner(t *testing.T) ssh.Signer

Types

type RequestReply

type RequestReply struct {
	Request string
	Reply   string
	Status  uint32
}

type Server

type Server struct {
	Endpoint string
	Listener net.Listener
	Config   *ssh.ServerConfig
	Handler  func(ssh.Channel, <-chan *ssh.Request)
	// contains filtered or unexported fields
}

func NewServer

func NewServer(t *testing.T, hostKey ssh.Signer) *Server

func (*Server) Close

func (s *Server) Close()

Jump to

Keyboard shortcuts

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