sshutils

package
v0.0.0-...-846ed22 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateSSHKeyPair

func GenerateSSHKeyPair(bits int, email, path string) error

Generate Key Pair

func GetConfigs

func GetConfigs() *models.Config

func GetLocalPublicSSHKey

func GetLocalPublicSSHKey() string

func RunCommandWithOutput

func RunCommandWithOutput(command string, ip string, port int, username string, privateKey string) ([]byte, error)

func SSHFingerprintGen

func SSHFingerprintGen(publicSSH string) string

Types

type Connection

type Connection struct {
	*ssh.Client
}

func Connect

func Connect(addr, username, sshKey string) (*Connection, error)

func GetConnection

func GetConnection(ip string, port int, username string, password string) (*Connection, error)

func GetConnectionBuild

func GetConnectionBuild(ip string, port int, username string, password string) (*Connection, error)

func RunCommand

func RunCommand(command string, ip string, port int, username string, privateKey string) *Connection

func RunCommandSilent

func RunCommandSilent(command string, ip string, port int, username string, privateKey string) (*Connection, error)

Jump to

Keyboard shortcuts

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