ssh from a to b. ssh from b to c. Use "~~." to exit from c back to b. Now "~." on b results in "command not recognized" by bash. A second "~." will exit from b back to a. Any intervening command on b, even ENTER alone, does the trick. This could be a bug in bash for all I know, but my hunch is ssh. In this particular case, "a" is an rPath x86 machine, version OpenSSH_4.5p1, OpenSSL 0.9.7f 22 Mar 2005. "b" is a gentoo x86, version OpenSSH_4.5p1, OpenSSL 0.9.8e 23 Feb 2007. "c" is "a" again.
I don't think this is a bug; it is a consequence of chained SSH connections and is logically consistent behaviour. Even if we were to consider it a bug, it would be near impossible to fix in the general case because a SSH session has no robust way of knowing that another SSH session is being tunneled through it.
Close resolved bugs after release.