sshaskpass

package
v0.0.0-...-65eea1c Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Prompt

type Prompt string

Prompt represents the literal SSH secret prompt a user normally sees.

func (Prompt) AskOther

func (p Prompt) AskOther() (resp string, err error)

AskOther asks the user to input a response and returns it as a string. If an error occurs, the function will return an empty string and an error message.

func (Prompt) AskPassword

func (p Prompt) AskPassword() (password string, err error)

AskPassword asks the user to input a password and returns it as a string. If an error occurs, the function will return an empty string and an error message.

func (Prompt) IsOTP

func (p Prompt) IsOTP() bool

IsOTP returns true if the prompt is requesting an OTP code.

func (Prompt) IsPassphraseForKey

func (p Prompt) IsPassphraseForKey() bool

IsPassphraseForKey returns true if the prompt is requesting a passphrase for a ssh key.

func (Prompt) IsPassword

func (p Prompt) IsPassword() bool

IsPassword returns true if the prompt is requesting a password.

func (Prompt) RequestedOtp

func (p Prompt) RequestedOtp() string

RequestedOtp extracts the OTP key from the prompt's text.

func (Prompt) RequestedPassphraseForKey

func (p Prompt) RequestedPassphraseForKey() string

RequestedPassphraseForKey extracts the file path to the ssh key.

func (Prompt) RequestedPassword

func (p Prompt) RequestedPassword() string

RequestedPassword extracts the name of requested password.

Jump to

Keyboard shortcuts

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