I have an Debian VM which is not connected to internet. Yet, I can still scp any file from my local machine which does have internet connection. To provide a little bit context,
sudo apt-get update
sudo apt-get install r-cran-digest
I can`t belive that it was so easy. I spent a long time searching and got only bad answers. This commands just solve everything. I used it on trisquel