I've modified configuration files on a FreeBSD filesystem image with a hex editor to cause it to obtain a dhcp lease and allow password ssh login for the default account. (Linux cannot read/write to the default FreeBSD filesystem.)
This allowed me to set up the RPi headless and keyboardless.
Of course the filesystem was dirty, but it's nothing an fsck couldn't solve.