ssh

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package ssh provides functions to manage local SSH keys. It includes the functions to create, read, delete, and check if a local SSH key pair exists.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(cfg *config.Config) *Manager

func (*Manager) CreateLocalKeyPair

func (m *Manager) CreateLocalKeyPair(name string) (publicKey string, err error)

CreateLocalKeyPair creates a local SSH key pair Returns the public key string in OpenSSH format.

func (*Manager) DeleteLocalKeyPair

func (m *Manager) DeleteLocalKeyPair(name string) error

DeleteLocalKeyPair deletes a local SSH key pair.

func (*Manager) LocalKeyExists

func (m *Manager) LocalKeyExists(name string) (bool, error)

LocalKeyExists checks if a local SSH key pair exists.

func (*Manager) ReadLocalPublicKey

func (m *Manager) ReadLocalPublicKey(name string) (string, error)

ReadLocalPublicKey reads a local public SSH key.

Jump to

Keyboard shortcuts

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