add DISABLE_SSH env var (#1061)

This commit is contained in:
henrygd
2026-02-04 18:48:55 -05:00
parent 028f7bafb2
commit 5452e50080
2 changed files with 23 additions and 0 deletions

View File

@@ -36,6 +36,9 @@ var hubVersions map[string]semver.Version
// and begins listening for connections. Returns an error if the server
// is already running or if there's an issue starting the server.
func (a *Agent) StartServer(opts ServerOptions) error {
if disableSSH, _ := GetEnv("DISABLE_SSH"); disableSSH == "true" {
return errors.New("SSH disabled")
}
if a.server != nil {
return errors.New("server already started")
}