Documentation
¶
Index ¶
- Constants
- func AdminClient(socket string) (api.AdminServiceClient, error)
- func AdminSocketFile(sessionID string) string
- func NewAutoAcceptingHostKeyCallback(stdout io.Writer, knownHostsFilename string) (ssh.HostKeyCallback, error)
- func NewPromptingHostKeyCallback(stdin io.Reader, stdout io.Writer, knownHostsFilename string) (ssh.HostKeyCallback, error)
- func Signers(privateKeys []string) ([]ssh.Signer, func(), error)
- func SignersFromFiles(privateKeys []string) ([]ssh.Signer, error)
- type AuthorizedKey
- func AuthorizedKeysFromFile(file string) (*AuthorizedKey, error)
- func CodebergUserAuthorizedKeys(usernames []string) ([]*AuthorizedKey, error)
- func GitHubUserAuthorizedKeys(usernames []string, logger *slog.Logger) ([]*AuthorizedKey, error)
- func GitLabUserAuthorizedKeys(usernames []string) ([]*AuthorizedKey, error)
- func SourceHutUserAuthorizedKeys(usernames []string) ([]*AuthorizedKey, error)
- type Host
Constants ¶
View Source
const (
AdminSockExt = ".sock"
)
Variables ¶
This section is empty.
Functions ¶
func AdminClient ¶
func AdminClient(socket string) (api.AdminServiceClient, error)
func AdminSocketFile ¶
func NewAutoAcceptingHostKeyCallback ¶ added in v0.19.0
func NewAutoAcceptingHostKeyCallback(stdout io.Writer, knownHostsFilename string) (ssh.HostKeyCallback, error)
NewAutoAcceptingHostKeyCallback creates a host key callback that automatically accepts unknown host keys and adds them to the known_hosts file without prompting. This is similar to SSH's StrictHostKeyChecking=accept-new behavior: - Unknown host keys are automatically accepted and added to known_hosts - Known host keys are still validated (preventing MITM attacks on subsequent connections)
Types ¶
type AuthorizedKey ¶ added in v0.13.0
func AuthorizedKeysFromFile ¶ added in v0.13.0
func AuthorizedKeysFromFile(file string) (*AuthorizedKey, error)
func CodebergUserAuthorizedKeys ¶ added in v0.14.0
func CodebergUserAuthorizedKeys(usernames []string) ([]*AuthorizedKey, error)
func GitHubUserAuthorizedKeys ¶ added in v0.13.0
func GitHubUserAuthorizedKeys(usernames []string, logger *slog.Logger) ([]*AuthorizedKey, error)
func GitLabUserAuthorizedKeys ¶ added in v0.13.0
func GitLabUserAuthorizedKeys(usernames []string) ([]*AuthorizedKey, error)
func SourceHutUserAuthorizedKeys ¶ added in v0.13.0
func SourceHutUserAuthorizedKeys(usernames []string) ([]*AuthorizedKey, error)
type Host ¶
type Host struct {
Host string
KeepAliveDuration time.Duration
Command []string
ForceCommand []string
Signers []ssh.Signer
HostKeyCallback ssh.HostKeyCallback
AuthorizedKeys []*AuthorizedKey
AdminSocketFile string
SessionCreatedCallback func(context.Context, *api.GetSessionResponse) error
ClientJoinedCallback func(*api.Client)
ClientLeftCallback func(*api.Client)
Logger *slog.Logger
Stdin *os.File
Stdout *os.File
ReadOnly bool
ForceForwardingInputForTesting bool
// SFTP configuration
SFTPDisabled bool // Disable SFTP subsystem entirely (--no-sftp)
SFTPPermissionChecker sftp.PermissionChecker // Optional: prompts user for SFTP permissions (nil = auto-allow)
}
Click to show internal directories.
Click to hide internal directories.