Friday, October 03, 2008

Probably at least once in life you've heard the old adage, "It's more powerful on the command line."

But never before have I encountered a command-line argument this powerful. I thought that ssh was powerful, what with its X11 forwarding and secure encryption and all. But just when I thought that the command line had reached its limit, the command line morphed and merged with the full weight of the NFL. Now introducing: ssh -NfL.

ssh, or Secure SHell, is an encrypted way to log into computers remotely, usually through the command line. VNC, or Virtual Network Computing, is another way to log into a computer remotely, but through sharing a screen. VNC with ssh tunneling is a way to combine screen sharing with the security of ssh.

Several websites give helpful hints on how to create ssh tunneling, and for awhile I used a sophisticated solution I found that involves a single line that creates the tunnel, establishes the local connection, and loops a sleep command to auto-close the client. The only problem was that for some reason the connection always seemed slow. I always thought that it was a limitation of my home internet, but one day I noticed that my girlfriend logged into her VNC server from my home with tremendous response rates.

And that day I stumbled upon a new command. A command alone worthy of the heavyweights of Joe Montana and Steve Young. An NFL command.

ssh -NfL creates a fast ssh tunnel with minimal coding. I don't even know if it's technically superior to the more sophistated command I was previously using, but there's no doubt that it's symbolically more powerful with -NfL by its side. What does the NFL do for ssh? "N" is an option not to present a command prompt to the user after logging in, allowing the user to continue operating from the local command line. "f" puts the ssh tunnel into the background, also to free up the local command line. "L" does the dirty work, creating the tunnel by forwarding a local port to the remote server.

And that's it! I did find the commands a little unwieldy to type in by hand on a regular basis, so I wrote up a little script; feel free to use it and comment on how to improve it as well. Now VNC through ssh tunneling is a speedy matter, bringing me from home to work insuperably faster than even the Grey shuttle can.

Notable Quotable

"This club with a shortage of ego and an excess of character ascended to baseball's throne in the way it preferred, with a collaborative performance." (Chris Haft, on the San Francisco Giants' 2012 World Series victory)

"In a society that craves results now, in a world that demands excellence every day, head coaches rarely are allowed the time they need to grow into the job and master it. Reminders of it come every year at this time. Head coaches are fired, head coaches are hired and the coaching carousel spins without producing in the ways NFL owners had hoped." (Adam Shefter, on the "coaching carousel" of rapid coaching firing/hiring after the season)

"A perennial danger among contemporary students of the New Testament is to overlook the two-thousand-year history of debate and interpretation generated by these twenty-seven books. The pressure to be up-to-date with the voluminous contemporary literature, combined with the penchant endemic to twenty-first-century Western culture to revere the innovative, even the faddish, and be suspicious of the traditional, conspires to blind us to our connections with twenty centuries of Christian readers." (Carson DA & Moo DJ, An Introduction to the New Testament, p. 31)