ethssh

package
v0.0.0-...-55c308e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateMachineNonce

func CreateMachineNonce() ([]byte, error)

CreateMachineNonce creates a nonce for a machine-locked key based on the hostname and username of the key.

func CreateSecretNonce

func CreateSecretNonce(secret string) ([]byte, error)

CreateSecretNonce creates a nonce derived from some secret provided by the user.

func MarshalPublicKey

func MarshalPublicKey(key crypto.PublicKey) ([]byte, error)

func WriteConfiguration

func WriteConfiguration(path string, cfg []*Config) error

Types

type Config

type Config struct {
	Account common.Address `json:"account"`
	Public  string         `json:"public"`
	Type    string         `json:"type"`
}

func ReadConfiguration

func ReadConfiguration(path string) ([]*Config, error)

type EthSSH

type EthSSH struct {
	// contains filtered or unexported fields
}

func NewEthSSH

func NewEthSSH(endpoint string) *EthSSH

func (*EthSSH) Accounts

func (e *EthSSH) Accounts(ctx context.Context) ([]common.Address, error)

func (*EthSSH) PrivateKey

func (e *EthSSH) PrivateKey(ctx context.Context, addr common.Address, nonce []byte) (ed25519.PrivateKey, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL