Documentation ¶
Index ¶
- func ConvertPublicEd25519ToCurve25519(ed25519Key string) (wgtypes.Key, error)
- func ExecuteCommand(cmd string, client *ssh.Client) (string, error)
- func NewConnection(host string, user string, auth ssh.AuthMethod, maxRetries int) (*ssh.Client, error)
- type Key
- func (k Key) AuthorizedKey() string
- func (k Key) EncodePrivateKeytoPEM() string
- func (k Key) GetID() string
- func (k Key) Private() []byte
- func (k Key) PrivateWG() wgtypes.Key
- func (k Key) Public() []byte
- func (k Key) PublicKey() string
- func (k Key) PublicString() string
- func (k Key) PublicWG() wgtypes.Key
- func (k Key) SSHAuth() ssh.AuthMethod
- func (k Key) Seed() []byte
- func (k Key) Sign(commit string) (string, error)
- func (k Key) Verify(commit string, signature string, publicKey string) error
- type Manager
- type Tunnel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteCommand ¶
ExecuteCommand opens a session using the provided client and executes the provided command
func NewConnection ¶
Types ¶
type Key ¶
type Key struct { Priv ed25519.PrivateKey Pub ed25519.PublicKey }
Key is an SSH key
func GetLocalKey ¶
func (Key) AuthorizedKey ¶
AuthorizedKey return the public key in a format that can be written directly to the ~/.ssh/authorized_keys file
func (Key) EncodePrivateKeytoPEM ¶
func (Key) PublicString ¶
func (Key) SSHAuth ¶
func (k Key) SSHAuth() ssh.AuthMethod
SSHAuth returns an ssh.AuthMethod that can be used to configure an ssh client
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager keeps track of all the keys
func CreateManager ¶
CreateManager returns a Manager, which implements the core.ProviderManager interface
func (*Manager) GenerateKey ¶
GenerateKey generates a SSH key pair
func (*Manager) GetKeyByPub ¶
GetKeyByPub returns a key that has the provided pubkey (base64 encoded)
func (*Manager) NewAuthFromKeyFile ¶
func (sm *Manager) NewAuthFromKeyFile(keyPath string) (ssh.AuthMethod, error)
NewAuthFromKeyFile takes a file path and returns an ssh authentication
Click to show internal directories.
Click to hide internal directories.