agentssh
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Index¶
Constants¶
const (// MagicSessionErrorCode indicates that something went wrong with the session, rather than the// command just returning a nonzero exit code, and is chosen as an arbitrary, high number// unlikely to shadow other exit codes, which are typically 1, 2, 3, etc.MagicSessionErrorCode = 229// MagicSessionTypeEnvironmentVariable is used to track the purpose behind an SSH connection.// This is stripped from any commands being executed, and is counted towards connection stats.MagicSessionTypeEnvironmentVariable = "CODER_SSH_SESSION_TYPE"// MagicSessionTypeVSCode is set in the SSH config by the VS Code extension to identify itself.MagicSessionTypeVSCode = "vscode"// MagicSessionTypeJetBrains is set in the SSH config by the JetBrains extension to identify itself.MagicSessionTypeJetBrains = "jetbrains")
Variables¶
This section is empty.
Functions¶
Types¶
typeServer¶
type Server struct {Env map[string]stringAgentToken func()stringManifest *atomic.Pointer[agentsdk.Manifest]ServiceBanner *atomic.Pointer[codersdk.ServiceBannerConfig]// contains filtered or unexported fields}
func (*Server)Close¶
Close the server and all active connections. Server can be re-usedafter Close is done.
func (*Server)CreateCommand¶
CreateCommand processes raw command input with OpenSSH-like behavior.If the script provided is empty, it will default to the users shell.This injects environment variables specified by the user at launch too.