Update event types and drop idea of global request

This commit is contained in:
Jose Garcia 2022-02-17 17:05:56 -05:00
parent ee349700de
commit 9556c72ecf
3 changed files with 2 additions and 15 deletions

View file

@ -50,7 +50,6 @@ func (s *sshSession) connect(ctx context.Context) error {
return fmt.Errorf("error creating ssh client connection: %w", err)
}
s.conn = sshClientConn
go s.handleGlobalRequests(reqs)
sshClient := ssh.NewClient(sshClientConn, chans, reqs)
s.Session, err = sshClient.NewSession()
@ -71,15 +70,6 @@ func (s *sshSession) connect(ctx context.Context) error {
return nil
}
func (s *sshSession) handleGlobalRequests(incoming <-chan *ssh.Request) {
for r := range incoming {
fmt.Println(r.Type)
// This handles keepalive messages and matches
// the behaviour of OpenSSH.
r.Reply(false, nil)
}
}
func (s *sshSession) Read(p []byte) (n int, err error) {
return s.reader.Read(p)
}