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,

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.


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


Learning .Net and C# on Mac OS X

I have been using Java for a while now, few recent instances got me interested in understanding .Net and C#.

I am using mac and decided to try out mono 2.0 which provides .Net development platform for OS X.

Click to continue reading “Learning .Net and C# on Mac OS X”