sshutil

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PubKey

type PubKey struct {
	Name           string
	PublicKey      string
	FingerprintMD5 string
}

PubKey is used to create temporary SSH keypairs. It is used as a way to disable root passwords emails on Droplet creation. The reason for not hardcoding a random public key is that it would look like a backdoor

func NewKeyFromFile

func NewKeyFromFile(publicKeyPath string) (*PubKey, error)

func NewKeyFromString

func NewKeyFromString(publicKey string) (*PubKey, error)

NewKeyFromString converts provided public key string to public key object.

func (*PubKey) Create

func (p *PubKey) Create(ctx context.Context, keysService godo.KeysService) error

Create uploads the public key to DigitalOcean.

func (*PubKey) Delete

func (p *PubKey) Delete(ctx context.Context, keysService godo.KeysService) error

Delete deletes the public key from DigitalOcean.

Jump to

Keyboard shortcuts

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