Skip to content
Permalink
Browse files

lfshttp: pass stdin to ssh

Some people have SSH prompt them for their passphrase when a key is
used. In such a situation, the user needs to be able to enter a password
on standard input so that they can use their key. When invoking ssh,
pass our standard input through to the ssh process so that it can prompt
the user if needed.
  • Loading branch information...
bk2204 committed Apr 24, 2019
1 parent 2bbe78f commit 59ed04855afd7e8f1bb126eb6f6a5c5297f59253
Showing with 2 additions and 0 deletions.
  1. +2 −0 lfshttp/ssh.go
@@ -4,6 +4,7 @@ import (
"bytes"
"encoding/json"
"fmt"
"os"
"os/exec"
"path/filepath"
"regexp"
@@ -87,6 +88,7 @@ func (c *sshAuthClient) Resolve(e Endpoint, method string) (sshAuthResponse, err

// Save stdout and stderr in separate buffers
var outbuf, errbuf bytes.Buffer
cmd.Stdin = os.Stdin
cmd.Stdout = &outbuf
cmd.Stderr = &errbuf

0 comments on commit 59ed048

Please sign in to comment.
You can’t perform that action at this time.