v.io: v.io/x/ref/test/testutil/testsshagent Index | Files

package testsshagent

import "v.io/x/ref/test/testutil/testsshagent"

Index

Package Files

sshagent.go

func GenerateSSHKeys Uses

func GenerateSSHKeys(dir string) ([]string, error)

GenerateSSHKeys generates sample ssh keys in the specified directory. The generated keys are: rsa, ecdsa-256, ecdsa-384, ecdsa-521 and ed25519.

func SSHAdd Uses

func SSHAdd(dir, sockname string, args ...string) (string, error)

SSHAdd runs ssh-add in the specified directory to connect to the agent sockname to add the specified keys.

func SSHKeyGen Uses

func SSHKeyGen(dir, filename string, args ...string) error

SSHKeyGen runs ssh-keygen in the specified directory to generate a key stored in filename, eg: SSHKeyGen(dir, "ecdsa-256", "-t", "ecdsa", "-b", "256", "-C", "ecdsa-256")

func SSHKeyGenAdd Uses

func SSHKeyGenAdd(dir, filename, sockname string, args ...string) error

SSHKeyGenAdd uses SSHKeyGen and SSHAdd to generate and add a key to an ssh agent.

func StartPreconfiguredAgent Uses

func StartPreconfiguredAgent() (func(), string, string, error)

StartPreconfiguredAgent starts an ssh agent and preconfigures it with the keys generated by GenerateSSHKeys. It returns a cleanup function, the socket name for the agent, the directory that the keys are created in and an error.

func StartSSHAgent Uses

func StartSSHAgent() (func(), string, error)

StartSSHAgent starts an ssh agent and returns a cleanup function and the socket name to use for connecting to the agent.

Package testsshagent imports 7 packages (graph). Updated 2020-10-22. Refresh now. Tools for package owners.