ssh

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSSHVersion added in v0.2.11

func GetSSHVersion() (string, error)

GetSSHVersion gets the version of the ssh client

Types

type SSH

type SSH struct {
	// contains filtered or unexported fields
}

SSH is a namespace

func NewSSH

func NewSSH(privateKey string) (*SSH, error)

NewSSH returns a new SSH object

func (*SSH) CheckKeyTypeAndClientVersion added in v0.2.11

func (s *SSH) CheckKeyTypeAndClientVersion(ctx context.Context)

CheckKeyTypeAndClientVersion checks to see if the key type selected is compatible with the ssh client version Particularly: https://github.com/chanzuckerberg/blessclient#ssh-client-78-cant-connect-with-certificates

func (*SSH) IsCertFresh

func (s *SSH) IsCertFresh(c *config.Config) (bool, error)

IsCertFresh determines if the cert is still fresh

func (*SSH) ReadAndParseCert added in v0.2.8

func (s *SSH) ReadAndParseCert() (*ssh.Certificate, error)

ReadAndParseCert reads a certificate off disk and attempts to unmarshal it

func (*SSH) ReadAndParsePrivateKey added in v0.2.8

func (s *SSH) ReadAndParsePrivateKey() (interface{}, error)

ReadAndParsePrivateKey reads and unmarshals a private key

func (*SSH) ReadCert

func (s *SSH) ReadCert() ([]byte, error)

ReadCert reads the ssh cert

func (*SSH) ReadPrivateKey added in v0.2.8

func (s *SSH) ReadPrivateKey() ([]byte, error)

ReadPrivateKey reads the private key

func (*SSH) ReadPublicKey

func (s *SSH) ReadPublicKey() ([]byte, error)

ReadPublicKey reads the SSH public key

func (*SSH) WriteCert

func (s *SSH) WriteCert(b []byte) error

WriteCert writes a cert to disk

Jump to

Keyboard shortcuts

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