I had the same problem running Ubuntu 18.04. I tried multiple solutions but my device (OnePlus 5T) was always unauthorized.
Solution
Configure udev rules on Ubuntu. To do this, just follow the official documentation: https://developer.android.com/studio/run/device
The idVendor of my device (OnePlus) is not listed. To get it, just connect your device and use lsusb
:
Bus 003 Device 008: ID 2a70:4ee7
In this example, 2a70
is the idVendor.
Remove existing adb keys on Ubuntu:
rm -v ~/.android/adbkey* ~/.android/adbkey ~/.android/adbkey.pub
'Revoke USB debugging authorizations' on your device configuration (developer options).
Finally, restart the adb server to create a new key:
sudo adb kill-server
sudo adb devices
After that, I got the authorization prompt on my device and I authorized it.