Skip to content

Commit

Permalink
x/crypto: disable wantReply in auth-agent-req to comply with OpenSSH
Browse files Browse the repository at this point in the history
The existing implementation does not comply with OpenSSH, where
the agent forwarding request is sent without wantReply flag.
https://github.com/openssh/openssh-portable/blob/master/ssh.c#L1818
(wantconfirm=0)
  • Loading branch information
ilyaluk committed Aug 19, 2019
1 parent 4def268 commit c8000f4
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions ssh/agent/forward.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,8 @@ import (
// ForwardToAgent or ForwardToRemote should be called to route
// the authentication requests.
func RequestAgentForwarding(session *ssh.Session) error {
ok, err := session.SendRequest("[email protected]", true, nil)
if err != nil {
return err
}
if !ok {
return errors.New("forwarding request denied")
}
return nil
_, err := session.SendRequest("[email protected]", false, nil)
return err
}

// ForwardToAgent routes authentication requests to the given keyring.
Expand Down

0 comments on commit c8000f4

Please sign in to comment.