I am trying to do
rsh on one of my VM but getting connection refused error.
I have checked
/etc/resolv.conf both have proper hostname, IP and domain.
Connection refused is the OS telling "I have no program to your connection to" that means that nothing is listening for your rsh commands.
If I'm not mistaken rsh connects to port 514 by default. So if you really must use rsh you need to check your target system for rshd
Please consider another service ...