Documentation ¶
Index ¶
Constants ¶
const ( // ChannelSession refers to a type of SSH channel that is established between a client and a server for interactive // shell sessions or command execution. SSH channels are used to multiplex multiple logical communication channels // over a single SSH connection. // // Check www.ietf.org/rfc/rfc4254.txt at section 6.1 for more information. ChannelSession string = "session" // ChannelDirectTcpip is the channel type in SSH is used to establish a direct TCP/IP connection between the SSH // client and a target host through the SSH server. This channel type allows the client to initiate a connection to // a specific destination host and port, and the SSH server acts as a bridge to facilitate this connection. // // Check www.ietf.org/rfc/rfc4254.txt at section 7.2 for more information. ChannelDirectTcpip string = "direct-tcpip" )
SSH channels supported by the SSH server.
An SSH channel refers to a communication link established between a client and a server. SSH channels are multiplexed over a single encrypted connection, facilitating concurrent and secure communication for various purposes.
SSH_MSG_CHANNEL_OPEN
Check www.ietf.org/rfc/rfc4254.txt for more information.
const ( // RequestTypeShell is the request type for shell. RequestTypeShell = "shell" // RequestTypeExec is the request type for exec. RequestTypeExec = "exec" // RequestTypeSubsystem is the request type for any subsystem. RequestTypeSubsystem = "subsystem" // RequestTypeUnknown is the request type for unknown. // // It is not a valid request type documentated by SSH's RFC, but it can be useful to identify the request type when // it is not known. RequestTypeUnknown = "unknown" )
List of request types that are supported by SSH.
Once the session has been set up, a program is started at the remote end. The program can be a shell, an application program, or a subsystem with a host-independent name. Only one of these requests can succeed per channel.
Check www.ietf.org/rfc/rfc4254.txt at section 6.5 for more information.
const (
// SFTPSubsystemName is the name of the SFTP subsystem.
SFTPSubsystemName = "sftp"
)
List of SSH subsystems names supported by the agent.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v0.16.0
type Config struct { // PrivateKey is the path for the SSH server private key. PrivateKey string // KeepAliveInterval stores the time between each SSH keep alive request. KeepAliveInterval uint }
Config stores configuration needs for the SSH server.
type Server ¶
func (*Server) CloseSession ¶
func (*Server) HandleConn ¶
func (*Server) ListenAndServe ¶
func (*Server) SetContainerID ¶ added in v0.13.0
func (*Server) SetDeviceName ¶
type Type ¶ added in v0.13.0
type Type string
Type is the type of SSH session.
const ( // SessionTypeShell is the session's type returned when the SSH client requests a shell. SessionTypeShell Type = "shell" // SessionTypeHeredoc is the session's type returned when the SSH client requests a command execution with a heredoc. // "heredoc" is a format that does not require a TTY, but attaches the client input to the command's stdin. // It is used to execute a sequence of commands in a single SSH connection without the need to open a shell. SessionTypeHeredoc Type = "heredoc" // SessionTypeExec is the session's type returned when the SSH client requests a command execution. SessionTypeExec Type = "exec" // SessionTypeSubsystem is the session's type returned when the SSH client requests a subsystem. SessionTypeSubsystem Type = "subsystem" // SessionTypeUnknown is the session's type returned when the SSH client requests an unknown session type. SessionTypeUnknown Type = "unknown" )
Directories ¶
Path | Synopsis |
---|---|
Package mode defines the interfaces used by the server to determine how to handle authentication and sessions.
|
Package mode defines the interfaces used by the server to determine how to handle authentication and sessions. |
connector
Package connector defines methods for authentication and sessions handles to SSH when it is running in connector mode.
|
Package connector defines methods for authentication and sessions handles to SSH when it is running in connector mode. |
host
Package host defines authentication and sessions handles to SSH when it is running in host mode.
|
Package host defines authentication and sessions handles to SSH when it is running in host mode. |