Documentation
¶
Overview ¶
Package ssh contains the ssh control interface
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var HostKeyFile string
HostKeyFile is the path to the host key to use for the ssh control interface
Functions ¶
func ReadUsersFile ¶
ReadUsersFile reads a json file containing all users and passwords allowed to access the ssh control interface It returns a dictionary user->password
func RegisterCommand ¶
func RegisterCommand(c Command)
RegisterCommand registers a command to allow its use from ssh control interface
Types ¶
type Command ¶
type Command struct { Name string // Name is the name of the command, which is used to access it from the terminal Usage string // Usage contains usage information for the command Info string // Info contains information about what the command does // Exec runs the command. It is passed the arguments as a string slice. // If it returns false, a usage message is printed, otherwise the returned string is printed ExecFunc func(args []string) (string, bool) // OptionsFunc (optional) is used for auto completion. It is passed a prefix and the number of the argument and should // return all possible completion options OptionsFunc func(prefix string, arg int) []string }
Command describes a ssh command
Source Files
¶
Click to show internal directories.
Click to hide internal directories.