We ought to be using the ssh_pkt_* routines for the messages which we