Documentation ¶
Index ¶
- func GetCertificate(certPath string) (*cssh.Certificate, error)
- func GetPublicKey(identity string) (string, []byte, error)
- func GetPublicKeyCertPath(pubKeyPath string) string
- func GetPublicKeyPath(identity string) (publicKeyPath string, err error)
- func IsCertificateValid(cert *cssh.Certificate) bool
- func NewSSHCommand(args []string) *exec.Cmd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCertificate ¶
func GetCertificate(certPath string) (*cssh.Certificate, error)
GetCertificate parses the SSH certificate at certPath and returns it as a ssh.Certificate.
func GetPublicKey ¶
GetPublicKey takes a path to a private key and finds its associated public key, reading it into memory and returning its content in byte form.
func GetPublicKeyCertPath ¶
GetPublicKeyCertPath takes the path to a SSH public key and returns the path to the associated signed certificate. For example, given $HOME/.ssh/id_rsa.pub it would return $HOME/.ssh/id_rsa-cert.pub.
func GetPublicKeyPath ¶
GetPublicKeyPath takes the path to a private key and returns the path to its associated public key. If the given path is empty, it defaults to returning the public key for $HOME/.ssh/id_rsa.
func IsCertificateValid ¶
func IsCertificateValid(cert *cssh.Certificate) bool
IsCertificateValid takes a SSH certificate and returns whether or not it is expired (TTL has been exceeded).
func NewSSHCommand ¶
NewSSHCommand returns a exec.Cmd type preconfigured to run the ssh binary using the given args and with all standard inputs/outputs configured to redirect the process to the end-user.
Types ¶
This section is empty.