Yeah, a broken pipe is what you would get. This line
cat /etc/ssh/sshd_config |grep ClientAlive*
has cat piped to grep. But cat only lasts as long as your file, and then abruptly exits, leaving the pipe to grep broken.
You don't actually need the 'cat' at all. grep will read the file.
grep ClientAlive* /etc/ssh/sshd_config
If you're scripting, there's some switch for grep that sets whether it found it or not (exits 0 or 1).