diff --git a/pkg/server/server.go b/pkg/server/server.go index 668c0172b..a91fb0f5f 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -121,7 +121,7 @@ func (m *MServer) runCommand(runPacket *packet.RunPacketType) { go func() { defer m.RemoveFdContext(runPacket.CK) donePk, err := shexec.RunClientSSHCommandAndWait(runPacket, fdContext, shexec.SSHOpts{}, m, m.Debug) - if donePk != nil { + if donePk != nil && !runPacket.Detached { m.Sender.SendPacket(donePk) } if err != nil {