ssh - no route to host
It seems likely that multicast is not working reliably on your wireless network, and that's breaking ARP. Look at your ARP tables on B and C to see if either host is missing an ARP mapping for the other. Try adding it manually and see if the problem goes away. Then you can troubleshoot your wireless network's multicast problems later.
As original poster didn't explain what "router settings caused the problem", I do it:
Some wireless routers have settings to keep stations connected wirelessly isolated.
Let's take TP-LINK TL-WR740N (V1 or V2) as an example.
On the "Wireless Advanced" page of the web-based management that model has checkbox "Enable AP Isolation" explained as:
Enable AP Isolation - Isolate all connected wireless stations so that wireless stations cannot access each other through WLAN.
Check the network settings for machine C.
If you are using DHCP (dynamically assigned IP addresses) for machines A and B, then you probably want to configure machine C to use DHCP also.
If you are using static IP addressing, make sure that machine C has a proper IP address (most likely, this means an IP address on the same subnet as machine A and machine B, since you haven't mentioned any other complexities in your network).