From a356df3396448fd367854383c23de507ea227d5e Mon Sep 17 00:00:00 2001 From: Sylvia Crowe Date: Tue, 13 Feb 2024 17:57:23 -0800 Subject: [PATCH] fix: allow 60 second timeouts for ssh inputs With the previous change, it is now possible to extend the timeout for manual inputs. 60 seconds should be a reasonable starting point. --- wavesrv/pkg/remote/sshclient.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wavesrv/pkg/remote/sshclient.go b/wavesrv/pkg/remote/sshclient.go index 68f864624..2100aee47 100644 --- a/wavesrv/pkg/remote/sshclient.go +++ b/wavesrv/pkg/remote/sshclient.go @@ -109,7 +109,7 @@ func createPublicKeyCallback(sshKeywords *SshKeywords, passphrase string) func() QueryText: fmt.Sprintf("Enter passphrase for the SSH key: %s", identityFile), Title: "Publickey Auth + Passphrase", } - ctx, cancelFn := context.WithTimeout(context.Background(), 15*time.Second) + ctx, cancelFn := context.WithTimeout(context.Background(), 60*time.Second) defer cancelFn() response, err := sstore.MainBus.GetUserInput(ctx, request) if err != nil { @@ -139,7 +139,7 @@ func createInteractivePasswordCallbackPrompt() func() (secret string, err error) return func() (secret string, err error) { // limited to 15 seconds for some reason. this should be investigated more // in the future - ctx, cancelFn := context.WithTimeout(context.Background(), 15*time.Second) + ctx, cancelFn := context.WithTimeout(context.Background(), 60*time.Second) defer cancelFn() request := &sstore.UserInputRequestType{ ResponseType: "text", @@ -199,7 +199,7 @@ func createInteractiveKbdInteractiveChallenge() func(name, instruction string, q func promptChallengeQuestion(question string, echo bool) (answer string, err error) { // limited to 15 seconds for some reason. this should be investigated more // in the future - ctx, cancelFn := context.WithTimeout(context.Background(), 15*time.Second) + ctx, cancelFn := context.WithTimeout(context.Background(), 60*time.Second) defer cancelFn() request := &sstore.UserInputRequestType{ ResponseType: "text",