EDIT: Instead of a VPN, one can apparently use an ssh SOCKS proxy. This worked for me as of January 2021. Specifically, commands for enabling a SOCKS proxy on my mac are:
sudo networksetup -setsocksfirewallproxy 'Ethernet' 127.0.0.1 4088
sudo networksetup -setsocksfirewallproxy 'Wi-Fi' 127.0.0.1 4088
ssh -N -D 4088 <remote host>
Then, in a separate terminal window, run grbgetkey as usual.
grbgetkey <LICENSE KEY>
See also https://support.gurobi.com/hc/en-us/community/posts/360076437251-grbgetkey-via-ssh-socks-proxy .
EDIT Sept. 2021: the following comment for Mac OS Catalina was given at the above link, 1:
I couldn't get these instructions to work. (on Catalina, it seems
opening a new terminal window doesn't give the terminal the proxy
information... and I was still getting the 'not an academic domain'
error) But this led me to an easier fix...
$ ssh -N -D 4088 [email protected]
Then in another terminal
$ export HTTP_PROXY=socks5://127.0.0.1:4088
$ grbgetkey --http --verbose <LICENSE KEY>
You can probably get this to use https too if you setup the
https_proxy variable, but I didn't try that.
EDIT Oct. 2022 (and still working Oct 2023):
It seems grbgetkey version 9.5.2 doesn't have the --http flag, but using HTTPS_PROXY did work for me:
$ ssh -N -D 4088 [email protected]
Then in another terminal
$ export HTTPS_PROXY=socks5://127.0.0.1:4088
$ grbgetkey --verbose <LICENSE KEY>