diff --git a/src/pkg/exp/ssh/channel.go b/src/pkg/exp/ssh/channel.go index 6ff8203ce27..9d75f37de74 100644 --- a/src/pkg/exp/ssh/channel.go +++ b/src/pkg/exp/ssh/channel.go @@ -244,13 +244,13 @@ func (c *channel) Write(data []byte) (n int, err error) { packet := make([]byte, 1+4+4+len(todo)) packet[0] = msgChannelData - packet[1] = byte(c.theirId) >> 24 - packet[2] = byte(c.theirId) >> 16 - packet[3] = byte(c.theirId) >> 8 + packet[1] = byte(c.theirId >> 24) + packet[2] = byte(c.theirId >> 16) + packet[3] = byte(c.theirId >> 8) packet[4] = byte(c.theirId) - packet[5] = byte(len(todo)) >> 24 - packet[6] = byte(len(todo)) >> 16 - packet[7] = byte(len(todo)) >> 8 + packet[5] = byte(len(todo) >> 24) + packet[6] = byte(len(todo) >> 16) + packet[7] = byte(len(todo) >> 8) packet[8] = byte(len(todo)) copy(packet[9:], todo) diff --git a/src/pkg/exp/ssh/client.go b/src/pkg/exp/ssh/client.go index 39aee804207..f22782244c9 100644 --- a/src/pkg/exp/ssh/client.go +++ b/src/pkg/exp/ssh/client.go @@ -403,8 +403,8 @@ func (w *chanWriter) Write(data []byte) (n int, err error) { n = len(data) packet := make([]byte, 0, 9+n) packet = append(packet, msgChannelData, - byte(w.peersId)>>24, byte(w.peersId)>>16, byte(w.peersId)>>8, byte(w.peersId), - byte(n)>>24, byte(n)>>16, byte(n)>>8, byte(n)) + byte(w.peersId>>24), byte(w.peersId>>16), byte(w.peersId>>8), byte(w.peersId), + byte(n>>24), byte(n>>16), byte(n>>8), byte(n)) err = w.writePacket(append(packet, data...)) w.rwin -= n return