I have a computer in my research lab that runs Ubuntu desktop. The computer is connected to the university’s corporate network via a wired connection. This allows the machine to connect to the university’s intranet and own public-facing website, but not other websites beyond the university’s corporate network. To connect to the latter, I am redirected to a HTML page for network authentication. This isn’t usually a problem — I’d just sign in with my network credentials in Firefox and, viola! I’d be connected until the machine is left idle for a period of time, whereupon Internet connection would be lost and I’d just sign in again to restore it.
One problem I had was with upgrading software packages on the Ubuntu machine remotely from my office computer (running Windows 7). You see, my office is located in another building. I can log on remotely to the Ubuntu machine using SSH (PuTTY), since the Windows and Ubuntu machines are both on the same corporate network and the ports are open, but the Ubuntu machine will not be able to update sources or download packages from the Internet until I authenticate my connection on the Ubuntu machine.
For a good while I thought I was stuck, because I couldn’t view the HTML sign in page in Firefox remotely, let alone entering my network credentials for authentication. The Ubuntu machine was running GNOME 3, which didn’t work with remote desktop applications, and I was reluctant to install a compatible desktop environment/window manager (e.g. Openbox) solely for this purpose.
The solution turned out to be simple enough. I installed the text-based browser, Lynx, on the Ubuntu machine:
sudo apt-get install lynx
Then, I connected by SSH to the Ubuntu machine from the Windows computer in my office, and simply browse to an external website (e.g. google.com) using lynx:
If authentication is needed, I’m redirected to the sign in page. I type my credentials and, viola! I then quit the browser by press Shift + Q on the keyboard.
Now I can upgrade packages remotely on that Ubuntu machine effortlessly:
sudo apt-get update
sudo apt-get upgrade