I'm trying to connect to a headless machine over a crossover cable. The headless machine gets it's address via dhcp. What is the easiest way to give the headless machine an ip address so I can connect to it?
My Laptop -- Ethernet Cable -- Headless machine
The headless machine is running ssh, but I don't know the ip address it has. I know it was configured for dhcp to get the address, and it runs Fedora 25.
If you're unable to get on the console, I think you have one option:
Start up a DHCP server on your machine, connect to the headless server, then watch the DHCP logs for which IP address gets assigned.
WARNING: If you do this, make damn sure that you disable and uninstall the DHCP server from your machine before connecting it to the rest of your network, lest you wreak havoc and cause yourself a huge headache.
Assumption is that this headless server has no "crash cart" connections such as USB ports for keyboard/mouse, or a VGA/DVI/HDMI output for a monitor.
Many OS's will auto-assign an IP in the 192.168.1.x range - change your laptop's IP to 192.168.1.254 (the oft-used 'gateway' address) with a mask of /24 (255.255.255.0). That should (!) put it in the same subnet as the system. You can then try SSH to 192.168.1.1 .. 192.168.1.10 (while the server might select anything from 1 .. 254, since it's "all alone" it likely will select something in the first 10 IP's available).
If you have access to a gateway with a DHCP server, connect it to the headless system and your laptop, using normal (not crossover) patch cables, and then log into its config page (your gateway IP) to see which IP's have been assigned. SSH to the other IP.
You might also check to see if this system has a "Management" NIC connection - this often connects to a system management processor, a "little brother" computer built into an expansion card or on the server motherboard, that provides full out of band management. You can discover if it has one (and what the default login is) by Googling the server's make and model number plus "Out of Band Management".