In Bash this "cat /proc/`echo $$`/stat | cut -d " " -f 4" is bloat for "echo $$" :-]
Besides, it's not the PID of your sshd but your current shell. If you "ps f" it you would see:
Code:
sshd root (master sshd)
\
sshd root (privsep)
\
sshd $LOGNAME (pts)
\
shell ($$)
so the most you can get is "pgrep -U $LOGNAME -f sshd".