rsh is not working ,error :connection refused

rsh is not working
command:rsh targethost -l username command
Error:Connection refused

I checked on the server rshd was not working.
Tried to start by /usr/sbin/in.rshd start
# ./in.rshd start
rshd: getpeername: Socket operation on non-socket

Please help

telnet from the source machine onto the rsh port.
You get a connection: permission problem configured through rsh
You don't: have a look at firewall config, whether your connection is generally working (ping) etc.