chattahoochie(8)        FreeBSD System Manager's Manual       chattahoochie(8)

NAME
     chattahoochie -- KQueue-Based Small Group Chat Server

SYNOPSIS
     chattahoochie [-i <interface> -p <port> -m <max-clients> -u <user> -g
                   <group> -x]

DESCRIPTION
     Chattahoochie is a plain text small group chat server intended for use
     with clients using 8-bit character sets.

     All data exchanged between clients and server is sent in the clear, and
     is thus readable by any third party whose equipment it traverses.  For
     use over insecure networks, it is recommended chattahoochie be made to
     listen on a loopback interface, and secure shell clients be then used to
     connect to the server host.  How to do this is described below in the
     section titled, SECURING CONNECTIONS.  In secure situations telnet or
     netcat can be used to make client connections.

     By default Chattahoochie accepts a maximum of five client connections at
     any one time.  This value may be altered with the -m command-line option.
     Chattahoochie does not provide the means for clients to create their own
     rooms or channels.  In the parlance of MU*s, Chattahoochie is a one-room
     "talker."  Chattahoochie will drop connections which have been idle for
     20 minutes.

   DISPLAY LOCKING
     Before inputting chat data, a client should lock the display by entering
     a blank line, to prevent other clients' output from scrolling the dis-
     play.  The display may be unlocked by entering another blank line after
     the client has finished entering his or her chat data.  Up to 500 incom-
     ing messages will be queued for the client while the display is locked.

   SECURING CONNECTIONS
     For cryptographically-secure usage, chattahoochie may be configured to
     listen only on a loopback interface (such as 127.0.0.1), and a secure
     shell client then be used to connect to the server host.

     For example, if you create a "chat" user on the server host, you may add
     a Match directive to the very end of /etc/ssh/sshd_config to run netcat
     as an intermediary for "chat" logins.  This will also prevent the "chat"
     user from running any other command on the system.  It is important to
     place the Match directive at the end of the file to avoid affecting other
     logins:

     Match User chat
        ForceCommand nc 127.0.0.1 8000

     Then restart sshd with

     kill -HUP `cat /var/run/sshd.pid`

     Check to make sure the daemon has restarted before you logout of your
     current ssh session!  If you make a typo in sshd_config, sshd will fail
     to restart, silently, and you will no longer be able to connect to the
     system as any user!  To verify sshd has restarted, open another xterm or
     virtual console and attempt to login as the "chat" user:

     ssh chat@fakehost.org

     If all is well, you should be able to login with the password you set for
     the chat user, and then be greeted with the chattahoochie login prompt.
     Touching the file /home/chat/.hushlogin into existence will suppress
     printing of the last login time and /etc/motd before netcat is run.

   CONFIGURATION
     Chattahoochie writes its pid into /var/run/chattahoochie.pid, if it can
     (ie., it is started as root), and may be stopped with a SIGTERM.  A rc.d
     script is provided and installed in /usr/local/etc/rc.d/.  Add the fol-
     lowing lines to /etc/rc.conf to start chattahoochie on system boot-up.
     Replace the items in brackets with values appropriate for your system,
     and/or add or remove options as suits your system.  The available options
     are described in full at the end of this manual page.

     chattahoochie_enable="YES"
     chattahoochie_flags="-u <user> -g <group>"

     Once your /etc/rc.conf is configured you may start, stop, or restart
     chattahoochie, or determine if it is running with the following commands:

     /usr/local/etc/rc.d/chattahoochie start
     /usr/local/etc/rc.d/chattahoochie stop
     /usr/local/etc/rc.d/chattahoochie restart
     /usr/local/etc/rc.d/chattahoochie status

     If you do not want chattahoochie started on system start, then set

     chattahoochie_enable="NO"

     and use the following commands:

     /usr/local/etc/rc.d/chattahoochie forcestart
     /usr/local/etc/rc.d/chattahoochie forcestop
     /usr/local/etc/rc.d/chattahoochie forcerestart
     /usr/local/etc/rc.d/chattahoochie forcestatus

     If the server encounters an error reading or writing data to or from a
     client, or runs out of memory, the particular connection which generated
     the error will be dropped.  All other errors will be logged via sys-
     log(3), and may be found in /var/log/messages.

     The following arguments are recognized.  They are all optional.

     -p  The -p option specifies the port to listen on.  This defaults to 8000
         if not specified.

     -i  By default, chattahoochie accepts connections on all interfaces it
         can find capable of IPv4 or IPv6.  The -i option, when present, over-
         rides this behavior, by limiting chattahoochie to accepting connec-
         tions from a specified interface only.  The option accepts the IP
         address of the desired interface as an argument.  The address must be
         expressed in the presentation format for either IPv4 or IPv6.

     -m  The -m option specifies the maximum number of clients which may be
         connected at any one time.  If not specified, this value defaults to
         5.

     -u

     -g  The -u and the -g options may be used to specify the user and group
         for the server to change to after it has bound to the listening
         socket.  If not specified, both values default to "nobody".  Note
         that in order for the server to change user the server must be
         started as root.  If not started as root, two error messages will be
         syslog()ed at start-up, complaining about the inability of the server
         to change user and group.  You can suppress them by providing values
         to -u and -g to override the default "nobody" with the actual user
         and group under which the server runs.

     -x  The -x option, if present, prevents chattahoochie from becoming a
         daemon.  It will then run in the foreground of the terminal where it
         was started, and may be stopped with signals (ie., Control-C).  The
         server also will not write its pid to /var/run/chattahoochie.pid when
         the -x option is used.

AUTHORS
     James Bailie <jimmy@mammothcheese.ca>
     http://www.mammothcheese.ca

                                  Apr 6, 2011