package ssh

import "github.com/docker/cli/cli/connhelper/ssh"

Package ssh provides the connection helper for ssh:// URL.

Index

Types

type Spec

type Spec struct {
	User string
	Host string
	Port string
	Path string
}

Spec of SSH URL

func NewSpec

func NewSpec(sshURL *url.URL) (*Spec, error)

NewSpec creates a Spec from the given ssh URL's properties. It returns an error if the URL is using the wrong scheme, contains fragments, query-parameters, or contains a password.

func ParseURL

func ParseURL(daemonURL string) (*Spec, error)

ParseURL creates a Spec from the given ssh URL. It returns an error if the URL is using the wrong scheme, contains fragments, query-parameters, or contains a password.

func (*Spec) Args

func (sp *Spec) Args(add ...string) []string

Args returns args except "ssh" itself combined with optional additional command args

Source Files

ssh.go

Version
v28.3.0+incompatible
Published
Jun 24, 2025
Platform
js/wasm
Imports
3 packages
Last checked
10 minutes ago

Tools for package owners.