sshfile

package
v0.0.0-...-6d4ea37 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoAuthMethods = errors.New("no auth methods could be used")

Functions

func IdentityAuth

func IdentityAuth(files ...string) (ssh.AuthMethod, error)

Types

type Bool

type Bool bool

func Boolean

func Boolean(b bool) *Bool

func (*Bool) Bool

func (b *Bool) Bool() bool

func (Bool) MarshalJSON

func (b Bool) MarshalJSON() ([]byte, error)

func (*Bool) UnmarshalJSON

func (b *Bool) UnmarshalJSON(p []byte) error

type Config

type Config struct {
	Port                  int      `json:"port,string,omitempty"`
	StrictHostKeyChecking *Bool    `json:"stricthostkeychecking,omitempty"`
	GlobalKnownHostsFile  string   `json:"globalknownhostsfile,omitempty"`
	UserKnownHostsFile    string   `json:"userknownhostsfile,omitempty"`
	TcpKeepAlive          *Bool    `json:"tcpkeepalive,omitempty"`
	ConnectTimeout        Duration `json:"connecttimeout,omitempty"`
	ConnectionAttempts    int      `json:"connectionattempts,string,omitempty"`
	ServerAliveInterval   Duration `json:"serveraliveinterval,omitempty"`
	ServerAliveCountMax   int      `json:"serveralivecountmax,string,omitempty"`
	Hostname              string   `json:"hostname,omitempty"`
	User                  string   `json:"user,omitempty"`
	IdentityFile          string   `json:"identityfile,omitempty"`
	Host                  Host     `json:"host,omitempty"`
}

func ParseArgs

func ParseArgs(args []string) (*Config, error)

func ParseOptions

func ParseOptions(options []string) (*Config, error)

func (*Config) Callback

func (c *Config) Callback() ssh.ConfigCallback

func (*Config) Merge

func (c *Config) Merge(in *Config) error

type Configs

type Configs []*Config

func ParseConfig

func ParseConfig(r io.Reader) (Configs, error)

func ParseConfigFile

func ParseConfigFile(path string) (Configs, error)

func (Configs) Callback

func (c Configs) Callback() ssh.ConfigCallback

func (Configs) LazyCallback

func (c Configs) LazyCallback() ssh.ConfigCallback

func (Configs) Merge

func (c Configs) Merge(in Configs) Configs

type Duration

type Duration time.Duration

func (Duration) Duration

func (d Duration) Duration() time.Duration

func (Duration) MarshalJSON

func (d Duration) MarshalJSON() ([]byte, error)

func (*Duration) UnmarshalJSON

func (d *Duration) UnmarshalJSON(p []byte) error

type Host

type Host struct {
	*regexp.Regexp
}

func (Host) Equal

func (h Host) Equal(rhs Host) bool

func (Host) MarshalJSON

func (h Host) MarshalJSON() ([]byte, error)

func (Host) String

func (h Host) String() string

func (*Host) UnmarshalJSON

func (h *Host) UnmarshalJSON(p []byte) error

Jump to

Keyboard shortcuts

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