ssh

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2016 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package ssh wraps core ssh package this package is still in development

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn struct {
	net.Conn
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
}

Conn represents connection and timeouts

func (*Conn) Read

func (c *Conn) Read(b []byte) (int, error)

Read set read timeout

func (*Conn) Write

func (c *Conn) Write(b []byte) (int, error)

Write set write timeout

type SSH

type SSH struct {
	Username  string
	Password  string
	PublicKey string
	Host      string
	Keepalive string
	Timeout   time.Duration
	Config    *ssh.ClientConfig
	Client    *ssh.Client
	Session   *ssh.Session
}

SSH represents SSH properties

func NewSSH

func NewSSH(args string, cfg cli.Config) (*SSH, error)

NewSSH creates new ssh object based on the cli

func (*SSH) ClientConfig

func (s *SSH) ClientConfig() error

ClientConfig adds auth methods

func (*SSH) NewClient

func (s *SSH) NewClient() error

NewClient make new SSH client

func (*SSH) NewPty

func (s *SSH) NewPty() error

NewPty creates new session, terminal and request pty

Jump to

Keyboard shortcuts

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