Skip to content

Commit

Permalink
fleetctl: fixed broken ssh terminal coreos#1499
Browse files Browse the repository at this point in the history
  • Loading branch information
kayrus committed Mar 11, 2016
1 parent 83c4099 commit 38e6079
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions ssh/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@ func makeSession(client *SSHForwardingClient) (session *gossh.Session, finalize
return
}

session.Stdout = os.Stdout
session.Stderr = os.Stderr
session.Stdin = os.Stdin

modes := gossh.TerminalModes{
gossh.ECHO: 1, // enable echoing
gossh.TTY_OP_ISPEED: 14400, // input speed = 14.4kbaud
Expand Down Expand Up @@ -116,6 +112,9 @@ func Execute(client *SSHForwardingClient, cmd string) (error, int) {
return err, -1
}

session.Stdout = os.Stdout
session.Stderr = os.Stderr

defer finalize()

session.Start(cmd)
Expand All @@ -142,6 +141,10 @@ func Shell(client *SSHForwardingClient) error {
return err
}

session.Stdout = os.Stdout
session.Stderr = os.Stderr
session.Stdin = os.Stdin

defer finalize()

if err = session.Shell(); err != nil {
Expand Down

0 comments on commit 38e6079

Please sign in to comment.