Assuming we're talking about Ethernet connecting to Ethernet, without PoE (power over Ethernet) then no, connecting an Ethernet cable will not harm either device.
Connecting Ethernet to a modem port may harm one of the devices, but I forget which one. Connecting Ethernet with PoE to a device with the incorrect cable MAY harm the device NOT supplying power. There are likely several other combinations which could cause harm to either or both sides.