Gurobi academic licenses will only activate if the machine you are using is connected to a recognised academic network. If you want to use an academic license on a cloud machine, Gurobi recommend using a VPN connection to your university network. The following is much easier.
- SSH into your remote machine, forwarding the remote port 8822:
ssh -R 8822:localhost:22 remote.host.com
. - From the remote, SSH back into your local machine, forwarding local port 8880, by:
ssh -p 8822 -L 8880:apps.gurobi.com:80 localhost
. For this to work you need to host an SSH server on your local machine; on MacOS you can turn on "Remote Login" in preferences to enable this. - Now, open another connection to the remote, and run
grbgetkey --http --port=8880 --server=localhost [your license key]
.