sshcommand

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package sshcommand provides functionality to build ssh command accompanied by options, which are taken from the user input or from the ssh_config file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaseCMD

func BaseCMD() string

BaseCMD return OS specific 'ssh' command.

func ConnectCommand

func ConnectCommand(options ...Option) string

ConnectCommand - builds ssh command to connect to a remote host.

func CopyIDCommand

func CopyIDCommand(options ...Option) string

CopyIDCommand - builds ssh command to copy ssh key to a remote host.

func LoadConfigCommand

func LoadConfigCommand(options ...Option) string

LoadConfigCommand - builds ssh command to load config from ssh_config file.

Types

type Option

type Option interface{}

Option - parent interface for command line option.

type OptionAddress

type OptionAddress struct{ Value string }

OptionAddress - is a remote host address. Example: somehost.com.

type OptionConfigFilePath

type OptionConfigFilePath struct{ Value string }

OptionConfigFilePath - is a path to ssh_config file.

type OptionLoginName

type OptionLoginName struct{ Value string }

OptionLoginName - is a login name which is used when connecting to a remote host. Ex: loginname@somehost.com.

type OptionPrivateKey

type OptionPrivateKey struct{ Value string }

OptionPrivateKey - ssh private key path in file system.

type OptionReadHostConfig

type OptionReadHostConfig struct{ Value string }

OptionReadHostConfig - is used to read host config from ssh_config.

type OptionRemotePort

type OptionRemotePort struct{ Value string }

OptionRemotePort - Remote port to connect to.

Jump to

Keyboard shortcuts

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