Connect directly to another device over ethernet

Perhaps a raspberry pi. Here's how to do that on windows 10.

Prerequisites

This guide assumes that an ssh server is already running on the device and that you already connected it with an ethernet cable to your PC. So here's a better title:

Find the IP Address of a directly connected raspberry pi

  1. Open the Control Panel > Networking and Internet image-20200323213232823
  2. Navigate to the Adapter Settings image-20200323213345282 image-20200323213420993
  3. Select your WiFi adapter. Yes, really. Because we are going to bridge your adapter for ethernet to the one for wifi, which will cause windows to set up a dhcp server. That is also known as Internet Connection Sharing (ICS). Open Properties. image-20200324144051702
  4. Switch to the tab "Sharing" and activate the first checkbox. Choose your LAN connection as target. Then check the second checkbox as well. image-20200324144232645 I cannot guarantee you anything about the security implications of doing this. I think it should be fine as long as your connected device is trusted, but you might want to undo those settings after use.
  5. Open the properties of your LAN Connection. Select TCP/IPv4 and open those properties. image-20200324144456629
  6. Here you can see the IP your PC has on the cable connection. Take note of it, you don't need to modify anything here. image-20200324144614724
  7. Open a terminal and run arp -a to list connected devices. If you're feeling lucky, you can try ping raspberrypi.local. If that does not work, search among the output of arp -a for the ip you found. In my case 192.168.137.1. Under it, there are several devices listed - perhaps more than make sense. If you know the MAC address of your pi, you can read the ip off that list. If you don't, you'll have to try the listed IP-Adresses until one is the right one.
  8. If that did not work, you can also use an ip scanner like angry ip scanner on the ip range 192.168.137.1 - 192.168.137.255 to find the raspberry pi's ip when it doesn't show up in your local arp table.
  9. Use the found ip to ssh into the raspberry pi via the ethernet cable: ssh pi@192.168.something.something