ssh

package
v0.0.1-alpha.5 Latest Latest
Warning

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

Go to latest
Published: May 20, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

https://gist.github.com/stefanprodan/2d20d0c6fdab6f14ce8219464e8b4b9a

Index

Constants

View Source
const DefaultSSHPort = 2222

Variables

This section is empty.

Functions

func AddEntry

func AddEntry(name, iface string, port int) error

AddEntry adds an entry to the user's sshconfig

func Copy

func Copy(local io.Reader, remote io.WriteCloser)

func GetPort

func GetPort(name string) (int, error)

GetPort returns the corresponding SSH port for the dev env

func RemoveEntry

func RemoveEntry(name string) error

RemoveEntry removes the entry to the user's sshconfig if found

Types

type Client

type Client interface {
	Attach() error
}

func NewClient

func NewClient(server, user string,
	port int, auth bool, privateKeyPath, privateKeyPwd string) (Client, error)

type Copier

type Copier struct {
	Local  io.Reader
	Remote io.WriteCloser
}

Copier copies from local to remote terminalhandles the lifecycle of all the forwards

func (*Copier) Copy

func (c *Copier) Copy()

Jump to

Keyboard shortcuts

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