I'm not sure about OS X but most Linuxes have netcat installed.
There's also OpenSSL s_client/s_server for an encrypted connection, although you need to setup some certificates first.
There's also OpenSSL s_client/s_server for an encrypted connection, although you need to setup some certificates first.