ssh

package
v0.0.0-...-cdf84e9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 28, 2014 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Provide SSH client commands and API that will enable SSH key distribution and revocation to individual servers. Key types are pluggable to allow other forms of access.

Index

Constants

View Source
const ContainerPermissionType = "container"

Variables

This section is empty.

Functions

func AddAuthorizedKeyGenerationType

func AddAuthorizedKeyGenerationType(handler AuthorizedKeysHandler)

Register a function to generate authorized keys for a system user.

func AddKeyTypeHandler

func AddKeyTypeHandler(id string, handler KeyTypeHandler)

Register a function to generate authorized keys for a system user.

func AddPermissionHandler

func AddPermissionHandler(id string, handler PermissionHandler)

Register a function to generate authorized keys for a system user.

func GenerateAuthorizedKeysFor

func GenerateAuthorizedKeysFor(user *user.User, forceCreate, printToStdOut bool) error

func KeyFingerprint

func KeyFingerprint(key key.PublicKey) utils.Fingerprint

func SshAccessBasePath

func SshAccessBasePath(i containers.Identifier) string

func SshAccessPathFor

func SshAccessPathFor(i containers.Identifier, name string) string

Types

type AuthorizedKeysHandler

type AuthorizedKeysHandler interface {
	MatchesUser(*user.User) bool
	GenerateAuthorizedKeysFile(u *user.User, forceCreate bool, printStdout bool) error
}

type KeyLocator

type KeyLocator interface {
	PathToKey() string
	NameForKey() string
}

type KeyTypeHandler

type KeyTypeHandler interface {
	CreateKey(key utils.RawMessage) (KeyLocator, error)
}

func KeyTypeHandlerFor

func KeyTypeHandlerFor(id string) (KeyTypeHandler, bool)

type PermissionHandler

type PermissionHandler interface {
	CreatePermission(locator KeyLocator, permission *utils.RawMessage) error
}

func PermissionHandlerFor

func PermissionHandlerFor(id string) (PermissionHandler, bool)

type SimpleKeyLocator

type SimpleKeyLocator struct {
	Path string
	Name string
}

func (*SimpleKeyLocator) NameForKey

func (l *SimpleKeyLocator) NameForKey() string

func (*SimpleKeyLocator) PathToKey

func (l *SimpleKeyLocator) PathToKey() string

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL