You can.
1. Direct connection: The problem is your ethernet cable.
To connect two computers directly you need to use a "crossover" ethernet cable OR use a switch. Normally both sides of the cable are wired identically, but if you want the cable to run directly in between it needs to be rewired into a crossover cable or use a crossover converter (essentially moving the wires around so the transmitting part on one computer is linked to the receiving part on the other).
Adapter: http://www.usbfirewire.com/Parts/rr-et-crossoveradapter.html
Make your own cable: http://en.wikipedia.org/wiki/Ethernet_crossover_cable
You can also use a small 4-port switch, which does this for you but it needs electricity. http://www.amazon.com/TP-LINK-TL-SF1005D-5-port-100Mbps-Desktop/dp/B000FNFSPY/ref=sr_1_2?ie=UTF8&qid=1426062657&sr=8-2&keywords=4+port+switch
After this you may need to have each computer assign a manual ip address to itself so they can talk to each other.
2. Managed connection: With a router in between to give both computers ip addresses. It needs electricity (a wall plug) and assigns ip addresses automatically.