Beware the Mathematician

Archive for June, 2011|Monthly archive page

Two-Hop SCP

In Geekery on June 16, 2011 at 12:34 AM

The University of Otago has a fairly anally-retentive firewall configuration. SSH in or out is strictly verboten. However, mail servers do allow incoming SSH connections, and once in, it’s easy to SSH into my machines in my office. The problem comes, however, with trying to use SCP. The mail server won’t let me copy files to outside the otago.ac.nz domain, and I can’t SSH into my machines directly.

After much hunting, I have found the solution. This will work for any two-hop SCP.

scp -Cp -o "ProxyCommand ssh gatewayuser@gateway nc remotehost 22" remoteuser@remotehost:/path/to/file/on/remote /path/to/file/on/local

Here, I use the term ‘gateway’ for the mail server, and ‘remotehost’ for the machine in my office.

Problem solved.

The State Is Not Your Friend

In Liberty, Videos on June 12, 2011 at 5:33 PM

I’ve been informed, in no uncertain terms, that I need to blog more. I’d like to claim that I’m too busy, rather than too lazy, but the reality is that I have the motivation of a doped up sloth at the moment. Thus, to appease my reader(s?), I though I’d put pen to paper* and write something.

I’m fortunate enough to have friends who link me to interesting articles and videos on a regular basis, two of which have really caught my attention in the last few days. The videos are very clear, and somewhat self-explanatory, which is something that appeals to my innate laziness. It’s not immediately apparent that the themes of these two very different videos are at all related, yet upon some closer inspection, they are making the same point in two different ways. Read the rest of this entry »

Follow

Get every new post delivered to your Inbox.