Documentation
¶
Overview ¶
Package testssh runs an in-process SSH server for tests.
It honours direct-tcpip channels, which is the mechanism an SSH port forward actually uses, so tests can prove a tunnel moves bytes rather than merely that it dials.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Server ¶
Server is a running test SSH server.
func StartRejecting ¶
StartRejecting launches a server that refuses every forwarding attempt, for exercising the failure path.
func (*Server) Stop ¶ added in v0.5.0
func (s *Server) Stop()
Stop takes the bastion away, closing the connections it has accepted along with the listener.
This is the event a session cannot see coming: a bastion restarted, a laptop suspended, a network moved. Rejecting new forwards would not do — the forwards already carrying a session would keep working, which is not what happens when a bastion goes.