Documentation
¶
Overview ¶
Package sshkey manages SSH key generation and provides an SSH client for VM access.
Index ¶
- type Client
- type Manager
- func (m *Manager) Dial(addr, user string, timeout time.Duration) (*Client, error)
- func (m *Manager) DialIP(ip net.IP, user string, timeout time.Duration) (*Client, error)
- func (m *Manager) EnsureKey() (string, error)
- func (m *Manager) Path() string
- func (m *Manager) PrivateKey() ([]byte, error)
- func (m *Manager) WaitForSSH(addr, user string, timeout time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client creates an SSH client connected to the given address.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles SSH key storage and client creation.
func NewManager ¶
NewManager creates a Manager with keys stored at the given path. The path should be the private key path (e.g., ~/.fleetbox/id_ed25519).
func (*Manager) Dial ¶
Dial connects to the SSH server at the given address using the manager's key.
func (*Manager) EnsureKey ¶
EnsureKey generates an ed25519 keypair if it doesn't exist. Returns the public key in authorized_keys format.
func (*Manager) PrivateKey ¶
PrivateKey returns the private key bytes.
Click to show internal directories.
Click to hide internal directories.