ssh

package
v1.9.20 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 41 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ETC_CERT = "etc/cert/"
	PEM      = "pem"
	KEY      = "key"

	SIGN    = "sign"
	VERIFY  = "verify"
	ENCRYPT = "encrypt"
	DECRYPT = "decrypt"
)
View Source
const (
	DIRECT   = "direct"
	AUTHFILE = "authfile"

	ID_RSA_KEY = ".ssh/id_rsa"
	ID_RSA_PUB = ".ssh/id_rsa.pub"
)
View Source
const (
	PRIVATE = "private"
	PUBLIC  = "public"
	AUTHS   = "auths"
	PUSHS   = "pushs"
)
View Source
const (
	WELCOME = "welcome"
	GOODBYE = "goodbye"
	AUTHKEY = "authkey"
	REQUEST = "request"
)
View Source
const (
	TTY = "tty"
	ENV = "env"
	CMD = "cmd"
	ARG = "arg"
	RES = "res"
)
View Source
const (
	INPUT  = "input"
	OUTPUT = "output"
)
View Source
const CERT = "cert"
View Source
const CHANNEL = "channel"
View Source
const CONNECT = "connect"
View Source
const RSA = "rsa"
View Source
const SERVICE = "service"
View Source
const SESSION = "session"
View Source
const SSH = "ssh"

Variables

This section is empty.

Functions

func CertPath added in v1.9.5

func CertPath(m *ice.Message, domain string) string

func CombinedOutput added in v1.8.1

func CombinedOutput(m *ice.Message, cmd string, cb func(string))

func LoadCertKey added in v1.9.5

func LoadCertKey(m *ice.Message) (*x509.Certificate, *rsa.PrivateKey, error)

func NewSession added in v1.6.1

func NewSession(m *ice.Message, arg ...string) (xterm.XTerm, error)

func Open added in v1.8.1

func Open(m *ice.Message, cb func(*FileSystem))

func PushOutput added in v1.8.1

func PushOutput(m *ice.Message, cmd string, cb func(string))

func PushShell added in v1.8.1

func PushShell(m *ice.Message, cmds []string, cb func(string))

func RunConnect added in v1.8.7

func RunConnect(arg ...string) string

func SaveCertKey added in v1.9.5

func SaveCertKey(m *ice.Message, file, Type string, Bytes []byte)

func Shell added in v1.8.1

func Shell(m *ice.Message, cb func(xterm.XTerm)) error

Types

type FileSystem added in v1.8.1

type FileSystem struct{ *sftp.Client }

func (*FileSystem) AppendFile added in v1.8.1

func (s *FileSystem) AppendFile(p string) (io.ReadWriteCloser, error)

func (*FileSystem) Close added in v1.8.1

func (s *FileSystem) Close() error

func (*FileSystem) CreateFile added in v1.8.1

func (s *FileSystem) CreateFile(p string) (io.WriteCloser, string, error)
func (s *FileSystem) Link(oldname string, newname string) error

func (*FileSystem) MkdirAll added in v1.8.1

func (s *FileSystem) MkdirAll(p string, m os.FileMode) error

func (*FileSystem) OpenFile added in v1.8.1

func (s *FileSystem) OpenFile(p string) (io.ReadCloser, error)

func (*FileSystem) ReadDir added in v1.8.1

func (s *FileSystem) ReadDir(p string) ([]os.FileInfo, error)

func (*FileSystem) Remove added in v1.8.1

func (s *FileSystem) Remove(p string) error

func (*FileSystem) RemoveAll added in v1.8.1

func (s *FileSystem) RemoveAll(p string) error

func (*FileSystem) Rename added in v1.8.1

func (s *FileSystem) Rename(oldname string, newname string) error

func (*FileSystem) StatFile added in v1.8.1

func (s *FileSystem) StatFile(p string) (os.FileInfo, error)
func (s *FileSystem) Symlink(oldname string, newname string) error

func (*FileSystem) WriteFile added in v1.8.1

func (s *FileSystem) WriteFile(p string, b []byte) error

type Winsize

type Winsize struct {
	Height, Width uint16
	// contains filtered or unexported fields
}

type XTerm added in v1.8.1

type XTerm struct {
	io.Reader
	io.Writer
	*ssh.Session
}

func (XTerm) Close added in v1.8.1

func (s XTerm) Close() error

func (XTerm) Setsize added in v1.8.1

func (s XTerm) Setsize(rows, cols string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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