If you were running
cat on the actual ksh binary file, then you were seeing the raw machine code of the ksh program being interpreted as if it was human-readable text. Of course, it wasn't, so the characters displayed were random characters from your terminal's character set, plus control and other non-printable characters.
Some of the control characters in a binary file can mess up your terminal's state. If you close the connection, that's fine, but you can also recover without closing your connection by pressing control-C to stop the process and then typing "reset" and pressing enter.