devcon

package
v0.0.0-...-4982e5b Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(user, target string, opts ...option) (*sshClient, error)

NewClient is a factory function that takes in a a username, a target in the form of an IP or a hostname, and potentially options.

func SetCipher

func SetCipher(cipher string) option

SetCipher updates the list of cipher algorithms. Common examples include:

  • aes128-ctr
  • aes192-ctr
  • aes256-ctr
  • 3des-cbc

func SetHostKeyCallback

func SetHostKeyCallback(knownhostsFile string) option

SetHostKeyCallback takes in a known hosts file, usually an absolute path, and applies it to the client as an option to protect against man-in-the-middle attacks.

func SetKey

func SetKey(keyfile string) option

SetKey takes in private key file, usually an absolute path, and applies it to the client as an option.

func SetKeyExchange

func SetKeyExchange(key string) option

SetKeyExchange updates the list of key exchange algorithms. Common examples include:

  • diffie-hellman-group1-sha1
  • diffie-hellman-group14-sha256
  • curve25519-sha256

func SetPassword

func SetPassword(pw string) option

SetPassword applies a password to the client.

func SetPort

func SetPort(port string) option

SetPort applies a port to the client. If not set, the default port of 22 is applied.

func SetTimeout

func SetTimeout(timeout time.Duration) option

SetTimeout applies a timeout in seconds for the client connection.

Types

This section is empty.

Jump to

Keyboard shortcuts

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