sshclient

package module
v0.0.0-...-00dd1d8 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentUser

func CurrentUser() string

CurrentUser Get the user name of the current system user

func HomeDir

func HomeDir() string

HomeDir Get the path to the current system user's home directory

Types

type SSHConnection

type SSHConnection struct {
	Client  *ssh.Client
	SSHConn ssh.Conn
	TCPConn *TCPConnection
}

SSHConnection ...

func New

func New(hostname string, port int, username string, password string) (client *SSHConnection, err error)

New ssh client connection

func (*SSHConnection) Close

func (ssh *SSHConnection) Close() error

Close the SSH session

type TCPConnection

type TCPConnection struct {
	Connection net.Conn
}

TCPConnection ...

func (*TCPConnection) Close

func (tcp *TCPConnection) Close() error

Close the TCP connection

Jump to

Keyboard shortcuts

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