sshutils

package
v0.0.0-...-3464aa7 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateClient

func CreateClient(cfg *SSHConfig) (*ssh.Client, error)

CreateClient creates ssh.Client using a SSHConfig

Types

type KeyPair

type KeyPair struct {
	PublicKey  []byte
	PrivateKey []byte
}

KeyPair a key pair

func CreateKeyPair

func CreateKeyPair(size int) (pair *KeyPair, err error)

CreateKeyPair creates a key pair using size bits

func (*KeyPair) AuthMethod

func (kp *KeyPair) AuthMethod() (ssh.AuthMethod, error)

AuthMethod returns the ssh.AuthMethod corresponding to this KeyPair

type SSHConfig

type SSHConfig struct {
	Addr         string
	ClientConfig *ssh.ClientConfig
	Proxy        *SSHConfig
}

SSHConfig defines a ssh configuration going throw a series of proxies

Jump to

Keyboard shortcuts

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