Documentation
¶
Index ¶
- type Server
- func Start(caPubKey sshcert.RawPublicKey) (*Server, error)
- func StartWithEpithetAuthorizedPrincipals(caPubKey sshcert.RawPublicKey, epithetPath string) (*Server, error)
- func StartWithEpithetAuthorizedPrincipalsInRealm(caPubKey sshcert.RawPublicKey, epithetPath string, realm principal.Realm) (*Server, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
User string
Path string
Port int
AuthorizedPrincipalsCommand string
Output safeBuffer
// contains filtered or unexported fields
}
func Start ¶
func Start(caPubKey sshcert.RawPublicKey) (*Server, error)
Start starts an sshd server as the current user, and returns a Server. The ssh server will be running in a temporary directory, and will process requests on a random port.
It will only process a single ssh connection before terminating.
func StartWithEpithetAuthorizedPrincipals ¶ added in v0.23.0
func StartWithEpithetAuthorizedPrincipals(caPubKey sshcert.RawPublicKey, epithetPath string) (*Server, error)
StartWithEpithetAuthorizedPrincipals starts an sshd whose principal lookup runs the supplied epithet binary against the server's generated realm.
func StartWithEpithetAuthorizedPrincipalsInRealm ¶ added in v0.41.0
func StartWithEpithetAuthorizedPrincipalsInRealm(caPubKey sshcert.RawPublicKey, epithetPath string, realm principal.Realm) (*Server, error)
StartWithEpithetAuthorizedPrincipalsInRealm starts an sshd in realm. An empty realm generates the ordinary isolated per-host default.
func (*Server) HostPublicKey ¶ added in v0.23.0
func (s *Server) HostPublicKey() sshcert.RawPublicKey
HostPublicKey returns the public half of the identity key used by this fixture's sshd.
func (*Server) Realm ¶ added in v0.41.0
Realm returns the authorization realm used by this fixture's principal authorization helper.