GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Why Go
  • Case Studies
  • Use Cases
  • Security
  • Learn
  • Effective Go
  • Go User Manual
  • Standard library
  • Release Notes
  • API
  • Packages
  • Recorded Talks
  • Meetups
  • Conferences

This view

  • Original page
  • New address

GeezerVison is showing pkg.go.dev — ssh package - knative.dev/func/pkg/ssh - Go Packages

Details

  • checked Valid go.mod file

    The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.

  • checked Redistributable license

    Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.

  • checked Tagged version

    Modules with tagged versions give importers more predictable builds.

  • unchecked Stable version

    When a project reaches major version v1 it is considered stable.

  • Learn more about best practices

Repository

github.com/knative/func

Links

  • Open Source Insights Logo Open Source Insights

Documentation ¶

Rendered for

Index ¶

  • Variables
  • func NewSSHClientConfig(url *urlPkg.URL, credentialsConfig Config) (*ssh.ClientConfig, error)
  • type Config
  • type ContextDialer
    • func NewDialContext(url *urlPkg.URL, config Config) (ContextDialer, string, error)
  • type DialContextFn
  • type HostKeyCallback
    • func NewHostKeyCbk() HostKeyCallback
  • type PassPhraseCallback
    • func NewPassPhraseCbk() PassPhraseCallback
  • type PasswordCallback
    • func NewPasswordCbk() PasswordCallback

Constants ¶

This section is empty.

Variables ¶

View Source
var ErrBadServerKeyMsg = "server key for given host differs from key in known_host"
View Source
var ErrUnknownServerKeyMsg = "server key not found in known_hosts"

Functions ¶

func NewSSHClientConfig ¶

func NewSSHClientConfig(url *urlPkg.URL, credentialsConfig Config) (*ssh.ClientConfig, error)

Types ¶

type Config ¶

type Config struct {
	Identity           string
	PassPhrase         string
	PasswordCallback   PasswordCallback
	PassPhraseCallback PassPhraseCallback
	HostKeyCallback    HostKeyCallback
}

type ContextDialer ¶

type ContextDialer interface {
	DialContext(ctx context.Context, network, address string) (net.Conn, error)
}

func NewDialContext ¶

func NewDialContext(url *urlPkg.URL, config Config) (ContextDialer, string, error)

NewDialContext allows access to docker daemon in a remote machine using SSH.

It creates a new ContextDialer which dials docker daemon in the remote and also returns Docker Host URI as seen by the remote.

Knowing the Docker Host is useful when mounting docker socket into a container.

Dialing the remote docker daemon can be done in two ways:

- Use SSH to tunnel Unix/TCP socket.

- Use SSH to execute the "docker system dial-stdio" command in the remote and forward its stdio.

The tunnel method is used whenever possible. The "stdio" method is used as a fallback when tunneling is not possible: e.g. when remote uses Windows' named pipe.

When tunneling is used all connection dialed by the returned ContextDialer are tunneled via single SSH connection. The connection should be disposed when dialer is no longer needed.

For this reason returned ContextDialer may also implement io.Closer. Caller of this function should check if the returned ContextDialer is also an instance of io.Closer and call Close() on it if it is.

type DialContextFn ¶

type DialContextFn = func(ctx context.Context, network, addr string) (net.Conn, error)

type HostKeyCallback ¶

type HostKeyCallback func(hostPort string, pubKey ssh.PublicKey) error

func NewHostKeyCbk ¶

func NewHostKeyCbk() HostKeyCallback

type PassPhraseCallback ¶

type PassPhraseCallback func() (string, error)

func NewPassPhraseCbk ¶

func NewPassPhraseCbk() PassPhraseCallback

type PasswordCallback ¶

type PasswordCallback func() (string, error)

func NewPasswordCbk ¶

func NewPasswordCbk() PasswordCallback

Source Files ¶

View all Source files
  • ssh_agent_conf.go
  • ssh_dialer.go
  • terminal.go
Click to show internal directories.
Click to hide internal directories.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.