Documentation ¶
Overview ¶
Package ssh implements the main logic for the ssh-gateway program.
Index ¶
- Constants
- type Gateway
- func (gtw *Gateway) Handle(conn net.Conn)
- func (gtw *Gateway) LoadConfig() error
- func (gtw *Gateway) RegisterCommand(name string, cmd cmd.Command)
- func (gtw *Gateway) SetCommandUser(commandUser string)
- func (gtw *Gateway) SetDefaultUser(defaultUser string)
- func (gtw *Gateway) SetSlackNotifier(slackNotifier *slack.Notifier)
Constants ¶
View Source
const Name = "Gateway"
Name to be used as SSH Client/Server name.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Gateway ¶
type Gateway struct {
// contains filtered or unexported fields
}
Gateway implements an SSH Gateway.
func NewGateway ¶
NewGateway instantiates a new SSH Gateway.
func (*Gateway) LoadConfig ¶
LoadConfig loads the configuration for the SSH Gateway.
func (*Gateway) RegisterCommand ¶ added in v0.2.0
RegisterCommand registers a command to the SSH gateway.
func (*Gateway) SetCommandUser ¶ added in v0.3.0
SetCommandUser sets the username for command execution (default is gateway).
func (*Gateway) SetDefaultUser ¶ added in v0.3.0
SetDefaultUser sets the default username to use on upstream servers (default is root).
func (*Gateway) SetSlackNotifier ¶ added in v0.4.0
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
ssh-gateway
ssh-gateway is a forward Proxy for SSH Servers.
|
ssh-gateway is a forward Proxy for SSH Servers. |
pkg
|
|
cmd
Package cmd implements dispatching commands on the SSH gateway using SSH's "exec" requests.
|
Package cmd implements dispatching commands on the SSH gateway using SSH's "exec" requests. |
encoding
Package encoding is adapted from golang.org/x/crypto/ssh.
|
Package encoding is adapted from golang.org/x/crypto/ssh. |
forward
Package forward implements forwarding SSH sessions to upstream servers.
|
Package forward implements forwarding SSH sessions to upstream servers. |
log
Package log lets you put a zap.Logger in a context.Context.
|
Package log lets you put a zap.Logger in a context.Context. |
Click to show internal directories.
Click to hide internal directories.