Documentation
¶
Overview ¶
Package ssh provides SSH key management helpers for ssmx.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultKeyPath ¶
func DefaultKeyPath() string
DefaultKeyPath returns the first existing standard SSH public key path, checking id_ed25519, id_rsa, id_ecdsa in order. Returns "" if none exist.
func DefaultSSHUser ¶
DefaultSSHUser returns the default SSH username for the given SSM PlatformName. Falls back to "ec2-user" for unknown platforms.
func LoadOrGenerateKey ¶
LoadOrGenerateKey returns the public key contents for keyPath. If keyPath is "", it generates a new ed25519 keypair at ~/.ssmx/ssh_key and returns the public key. If the key already exists at that path, it is reused without regenerating.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.