ssh: send exit-status request for successful commands
The crypto/ssh client library requires this.
This commit is contained in:
parent
6184621747
commit
0d8462cfe7
4
ssh.go
4
ssh.go
@ -161,6 +161,10 @@ func (s *session) request(req *ssh.Request) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// See https://tools.ietf.org/html/rfc4254#section-6.10
|
||||||
|
if _, err := s.channel.SendRequest("exit-status", false /* wantReply */, []byte("\x00\x00\x00\x00")); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
s.channel.Close()
|
s.channel.Close()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user