Documentation
¶
Overview ¶
Package sshushd controls the sshush agent daemon: starting, stopping, reloading, and running the agent in the background. It spawns the sshushd binary and manages the pidfile.
Index ¶
- func CheckAlreadyRunning(socketPath string) bool
- func FindBinary() (string, error)
- func ReloadDaemon(configPath, socketPath, pidFilePath string) error
- func RunAgent(ctx context.Context, socketPath string, keyPaths []string) error
- func RunDaemonOnly(socketPath string, keyPaths []string, pidFilePath string) error
- func StartDaemon(configPath, socketPath string) error
- func StopDaemon(pidFilePath string) error
- func WaitForSocket(socketPath string, maxAttempts int, interval time.Duration) bool
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckAlreadyRunning ¶
CheckAlreadyRunning returns true if something is already listening on the socket.
func ReloadDaemon ¶
ReloadDaemon stops any existing daemon and starts a new one.
func RunAgent ¶
RunAgent runs the agent in the current process: loads keys and serves on the socket until ctx is done. Does not detach or write a pidfile. Use for in-process (e.g. subshell) mode.
func RunDaemonOnly ¶
RunDaemonOnly runs the agent daemon in the current process: detaches from terminal, writes pidfile, loads keys, and serves on the socket. Call only from the sshushd binary. Removes pidfile and socket on exit.
func StartDaemon ¶
StartDaemon starts sshushd with SSHUSH_CONFIG and waits for socket readiness.
func StopDaemon ¶
StopDaemon sends SIGTERM to the process in pidFilePath and waits for it to exit.