I'm working on a machine M1 on which I need to install some python stuff using pip. This system is on an internal network. For reasons, it doesn't have a DNS server configured, nor can it open connections to arbitrary machines on the Internet. It can basically just connect to the machine I'm contorlling it from, M2, via SSH; and M2 is properly connected to the Internet.
My question: How can I install pip packages from machine M1?
Notes:
- Both machines run a (slightly dated) Linux distribution. Can provide additional info upon request in the comments.
- I have root on M1, but a non-root-privileges solution would be better if you can offer one.