ssh

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2025 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const PORT = 22

Variables

This section is empty.

Functions

func AddPublicKeys

func AddPublicKeys(client *ssh.Client) bool

func AskPassword

func AskPassword() (string, error)

func Connect

func Connect(user, server string)

func InitSSHConnection

func InitSSHConnection(user, password, host, group, environment, alias string, setupDotFiles bool)

InitSSHConnection attempts to establish an SSH connection using multiple methods. It first tries a standard SSH connection, and if that fails, attempts using a custom dialer. Once connected, it handles key setup and optional dotfile configuration.

func NewSSHClient

func NewSSHClient(user, host string) (*ssh.Client, error)

func RotateKeys added in v0.2.0

func RotateKeys(client *ssh.Client, user, privateKeyPath, publicKeyPath string) error

RotateKeys rotates the SSH keys for the given client using the provided Ed25519 key pair

Types

This section is empty.

Jump to

Keyboard shortcuts

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