UIUC, VPN, and ssh on linux

Recently UIUC had started requiring using vpn to ssh into computers in UIUC. After some time spent on this, here is the easiest way to work with this under linux (from my own experience – YMMV). It does not seem to require root permissions (except for installing the relevant packages).

  1. No need to use the cisco stuff. openconnect works well. Another package that is quite useful is ocyproxy. Assuming you have debian/ubuntu system, first do the following:

    sudo apt-get install openconnect ocproxy

  2. Next, you create a proxy socks port on your local computer which goes through the vpn (run this from a terminal/shell script/etc):

    echo "your_netid_password" \
           | openconnect --script-tun --script "ocproxy -D 9052" \
                              --authgroup=SplitTunnel -b \
                              --user=your_net_id --passwd-on-stdin \

  3. You need to let your ssh setup know to use this local port for ssh into your remote UIUC machine. To this end, add to the file ~/.ssh/config the following lines:

    Host yourhostname.cs.illinois.edu
      ProxyCommand nc -X 5 -x %h %p

  4. And thats it – you should be in business. Doing

    ssh yourhostname.cs.illinois.edu

    should happily connect you to your uiuc host.

Comments are closed.