ssh

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2018 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptSSHKey

func DecryptSSHKey(key []byte, password []byte) (gossh.Signer, error)

Types

type Client

type Client struct {
	*gossh.Client
	Config                  *gossh.ClientConfig
	IP, User, Keypath       string
	Port                    int
	Proxy                   *Client
	HostKeyCallback         gossh.HostKeyCallback
	StrictHostKeyChecking   bool
	InteractiveTerminalFunc func(*gossh.Client) error
	// contains filtered or unexported fields
}

func InitClient

func InitClient(keyname string, keyFolders ...string) (*Client, error)

func (*Client) CloseAll added in v0.1.2

func (c *Client) CloseAll() error

func (*Client) Connect

func (c *Client) Connect() (err error)

func (*Client) ConnectString

func (c *Client) ConnectString() string

func (*Client) DialWithUsers

func (c *Client) DialWithUsers(usernames ...string) error

func (*Client) NewClientWithProxy added in v0.1.2

func (c *Client) NewClientWithProxy(destinationHost string, destinationPort int, usernames ...string) (*Client, error)

func (*Client) SSHConfigString

func (c *Client) SSHConfigString(hostname string) string

func (*Client) SetLogger

func (c *Client) SetLogger(l *logger.Logger)

func (*Client) SetStrictHostKeyChecking added in v0.0.25

func (c *Client) SetStrictHostKeyChecking(hostKeyChecking bool)

Jump to

Keyboard shortcuts

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