sshsignin

package
v0.0.0-...-43bb807 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2022 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dial

func Dial(server string, config *Config) (*httputil.Client, error)

Dial signs in a server and returns the credentials.

func FindKey

func FindKey(ag agent.Agent, comment string) (*agent.Key, error)

FindKey finds the agent key in the SSH agent that has the exact comment.

func SysAgent

func SysAgent() (agent.ExtendedAgent, error)

SysAgent returns the system's SSH agent by connecting to SSH_AUTH_SOCK.

func SysUser

func SysUser() (string, error)

SysUser returns the default system user. It returns the value of SHANHU_USER if set, or system's current user name.

Types

type Config

type Config struct {
	User string // Default using SHANHU_USER or system user name.

	Agent      agent.ExtendedAgent // Default using SSH_AUTH_SOCK
	KeyComment string              // Default is "shanhu"
}

Config contains the configuration to sign in with an SSH certificate.

Jump to

Keyboard shortcuts

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