- send_packet(SSH1_CMSG_WINDOW_SIZE,
- PKT_INT, rows, PKT_INT, cols,
- PKT_INT, 0, PKT_INT, 0, PKT_END);
+ if (ssh_version == 1) {
+ send_packet(SSH1_CMSG_WINDOW_SIZE,
+ PKT_INT, rows, PKT_INT, cols,
+ PKT_INT, 0, PKT_INT, 0, PKT_END);
+ } else {
+ ssh2_pkt_init(SSH2_MSG_CHANNEL_REQUEST);
+ ssh2_pkt_adduint32(mainchan->remoteid);
+ ssh2_pkt_addstring("window-change");
+ ssh2_pkt_addbool(0);
+ ssh2_pkt_adduint32(cols);
+ ssh2_pkt_adduint32(rows);
+ ssh2_pkt_adduint32(0);
+ ssh2_pkt_adduint32(0);
+ ssh2_pkt_send();
+ }