I know it is mentioned to connect with an ethernet cable.
This is a simple thing you've probably already thought about but you can only connect computers directly to each other if you use a "Cross" cable. (A cable with TX and RX pairs reversed).

I have switches in my racks so I don't need cross cables but if you are not using a switch or hub, you will.

Also, if no other computers are connected except the two you are using then you are also running into the fact there is no DHCP server. For this, just manually assign IP addressed to each machine.

Example settings are 192.168.0.2 for first machine and 192.168.0.3 for second machine. Also set the subnet mask to 255.255.255.0 which shouldn't matter but okay to do anyway. Don't set a default gateway and don't set DNS servers. You won't need them.

Once you do this, you should be able to connect.