I have two computers. Both of them are from different private networks. I'd like to connect from one of them to another (to program on it remotely). I attempted to use some remote desktop software (teamviewer). However, I encountered some issues with internet connection bandwidth and screen resolution. So, I search some way to get just terminal access to remote computer. I'm a beginner in Linux. And as far as I understand the remote console access to other computer is obtaining via ssh (or telnet?). Unfortunately both of computers have private IP, so I unable to use SSH (reverse) tunneling.
How to get remote terminal access to other computer in my case? (I'd prefer free solution)