Skip to content

Commit 3b6621c

Browse files
authored
Fix compatibility with golang crypto ssh (#18406)
1 parent 436130b commit 3b6621c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

components/ws-proxy/pkg/sshproxy/forward.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ func (s *Server) ChannelForward(ctx context.Context, session *Session, targetCon
6464
go func() {
6565
defer wg.Done()
6666
_, _ = io.Copy(targetChan, originChan)
67+
_ = targetChan.CloseWrite()
6768
targetChannelWg.Done()
6869
targetChannelWg.Wait()
6970
_ = targetChan.Close()
@@ -72,6 +73,7 @@ func (s *Server) ChannelForward(ctx context.Context, session *Session, targetCon
7273
go func() {
7374
defer wg.Done()
7475
_, _ = io.Copy(originChan, targetChan)
76+
_ = originChan.CloseWrite()
7577
originChannelWg.Done()
7678
originChannelWg.Wait()
7779
_ = originChan.Close()

0 commit comments

Comments
 (0)