Documentation ¶
Overview ¶
Package fakesshserver implements a fake SSH server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
Handler receives a command requested by an SSH client and decides whether to handle the request. If it returns true, a reply is sent to the client indicating that the command is accepted, and returned Process is called with stdin/stdout/stderr. If it returns false, an unsuccessful reply is sent to the client.
func ExactMatchHandler ¶
ExactMatchHandler constructs a Handler that replies to a command request by proc if it exactly matches with cmd.
func ShellHandler ¶
ShellHandler constructs a Handler that replies to a command request by running it as is with "sh -c" if its prefix matches with the given prefix.
Click to show internal directories.
Click to hide internal directories.