Implement initial support for passphrase-protected SSH keyfiles

This commit is contained in:
2024-05-17 11:42:44 -04:00
parent 774b761d25
commit c7635a1ef0
4 changed files with 32 additions and 18 deletions
+2 -2
View File
@@ -25,8 +25,8 @@ func input(prompt string) string {
return strings.TrimRight(userInput, "\n\r ") // remove trailing newlines, carriage returns, and spaces
}
// inputHidden prompts the user for input and returns the input as a string, hiding the input from the terminal
func inputHidden(prompt string) string {
// InputHidden prompts the user for input and returns the input as a string, hiding the input from the terminal
func InputHidden(prompt string) string {
fmt.Print("\n" + prompt + " ")
byteInput, _ := terminal.ReadPassword(int(os.Stdin.Fd()))
password := string(byteInput)