How do I authorize my device for ADB if I have only the recovery installed (no ROM)? I'm using a Nexus 5 (hammerhead) and was running CyanogenMod 13. I used CyanogenMod Recovery to wipe /data and /system, but to sideload a different ROM, a quick Google search told me I needed to update adb on my Ubuntu 14.10 install.

However, after updating adb to 1.0.32, doing adb devices shows my phone as unauthorized, and thus I cannot flash, push or sideload to the device whatsoever. I can't authorize it either, because I have no Android or CyanogenMod on the device to receive the authorization request.

How do I fix this?
I learned that fastboot requires the phone to be in the bootloader, not recovery. I was able to flash a new recovery using fastboot flash recovery recovery.img.