Speed Up SSH Connections

If you are working with a remote server using SSH, which requires frequent connections you might have noticed how it takes a lot of time to establish a connection. You also have to enter password every time you connect.

You can speed up this processes by configuring ssh to reuse connection to the same server if its has a connection already established.

This is a feature of OpenSSH, which I have tested on Snow Leopard and Ubuntu.

As per manual,

ControlMaster
Enables the sharing of multiple sessions over a single network connection. When set to “yes”, ssh(1) will listen for connections on a control socket specified using the ControlPath argument. Additional sessions can connect to this socket using the same ControlPath with ControlMaster set to “no” (the default). These sessions will try to reuse the master instance’s network connection rather than initiating new ones, but will fall back to connecting normally if the control socket does not exist, or is not listening.

In order to configure, create or edit ~/.ssh/config file and add following lines –

Host *
ControlMaster auto
ControlPath /tmp/%r@%h:%p

In order to test above, you can use -v while using ssh command. This will print debug information message while establishing a connection. While using ControlMaster you will notice that the there are lesser messages.

debug1: auto-mux: Trying existing master

If you don’t want to reuse existing connection you can use ssh with -S none which will create a new connection.


More



Ubuntu – Extract Archive on Open or Double Click

In Mac OS X, when you double-click a ZIP file its contents are extracted. I wanted similar functionality in Ubuntu. You can use file-roller utility to extract files to the destination folder name as zip file name.

You can set above as a default action, by viewing the property of any zip file in Nautilus and selecting file-roller with -h as command line option.

Zip Prop

Screenshot-Add Application

Screenshot-mockito-1.8.0.zip Properties

More



Ubuntu – Install from USB

I was struggling to install Ubuntu 9.04 (Jaunty Jackalope) using the USB drive as I was not having any CD media. I tried couple of methods which required me to copy syslinux etc in order to build USB bootable Ubuntu disk from scratch.

There is another way which I just found out, its quite strightforward and works out of box 🙂

UNetbootin allows you to create bootable Live USB drives for a variety of Linux distributions from Windows or Linux, without requiring you to burn a CD. You can either let it download one of the many distributions supported out-of-the-box for you, or supply your own Linux .iso file if you’ve already downloaded one or your preferred distribution isn’t on the list.

UNetbootin

More