Problems with xinetd configuration
I want to use xinetd in conjunction with netcat. netcat shall dispatch small messages that contain usernames to the server on which xinetd is running and listening for incoming connections.
I could also accomplish this with rsh/ssh, but I decided to use netcat, because here I can choose between UDP and TCP, whereas rsh/ssh are always TCP-based.
The client works like this:
In etc/xinetd.d I added this file:
exec 5<> /dev/tcp/$host/$port
echo "check connection">&5
disable = no
socket_type = stream
port = 4700
server = /usr/local/bin/message
user = nobody
wait = no
The message file contains only an echo command to check if it has been called.
In /etc/services I added this line:
However, that doesn't work and I'm getting a "connect: Connection refused" message. What did I do wrong?